From 4fd3cc4bd6892aaf00e1342f87f10276425419d0 Mon Sep 17 00:00:00 2001 From: et-nik Date: Sat, 28 Aug 2021 00:51:27 +0300 Subject: [PATCH] Fix webpack config --- .drone.yml | 1 + package.json | 15 ++++++++------- webpack.mix.js | 14 +++++++++----- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.drone.yml b/.drone.yml index c61ea042..c44ca219 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,6 +13,7 @@ steps: - name: npm image: node commands: + - node --version - npm install - npm run prod diff --git a/package.json b/package.json index a1c28b5f..b1d9a9d2 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,12 @@ "private": true, "scripts": { "dev": "npm run development", - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch-poll": "npm run watch -- --watch-poll", - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", + "development": "mix", + "watch": "mix watch", + "watch-poll": "mix watch -- --watch-options-poll=1000", + "hot": "mix watch --hot", "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js" + "production": "mix --production" }, "dependencies": { "@fortawesome/fontawesome-free": "^5.15.1", @@ -28,7 +28,8 @@ "vue2-datepicker": "^3.8.2" }, "devDependencies": { - "resolve-url-loader": "^3.1.2", - "vue-template-compiler": "^2.6.12" + "resolve-url-loader": "^4.0.0", + "vue-loader": "^15.9.8", + "vue-template-compiler": "^2.6.14" } } diff --git a/webpack.mix.js b/webpack.mix.js index 1d92d026..b37caa5c 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -14,8 +14,12 @@ let mix = require('laravel-mix'); mix.js('resources/assets/js/app.js', 'public/js') .sass('resources/assets/sass/app.scss', 'public/css') .webpackConfig({ - output: { - chunkFilename: 'js/chunks/[name].js?[chunkhash]', - publicPath: '/', - } -}); \ No newline at end of file + output: { + chunkFilename: 'js/chunks/[name].js?[chunkhash]', + publicPath: '/', + } + }) + .vue({ + extractStyles: true, + globalStyles: false +});