Skip to content

Commit

Permalink
Fix webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
et-nik committed Aug 27, 2021
1 parent 9dc633f commit 4fd3cc4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
1 change: 1 addition & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ steps:
- name: npm
image: node
commands:
- node --version
- npm install
- npm run prod

Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
14 changes: 9 additions & 5 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '/',
}
});
output: {
chunkFilename: 'js/chunks/[name].js?[chunkhash]',
publicPath: '/',
}
})
.vue({
extractStyles: true,
globalStyles: false
});

0 comments on commit 4fd3cc4

Please sign in to comment.