File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ const path = require('path');
1111 | file for the application as well as bundling up all the JS files.
1212 |
1313 */
14-
15- mix . webpackConfig ( {
14+ let config = {
1615 resolve : {
1716 alias : {
1817 'config' : 'assets/js/config' ,
@@ -28,7 +27,18 @@ mix.webpackConfig({
2827 path . resolve ( __dirname , "resources" )
2928 ]
3029 } ,
31- } ) ;
30+ }
31+
32+ if ( ! process . argv . includes ( '--hot' ) ) {
33+ config = Object . assign ( config , {
34+ output : {
35+ publicPath : "/" ,
36+ chunkFilename : 'js/[name].[chunkhash].js'
37+ }
38+ } )
39+ }
40+
41+ mix . webpackConfig ( config )
3242
3343let themes = [
3444 'resources/assets/sass/themes/default-theme.scss' ,
@@ -45,11 +55,5 @@ mix.js('resources/assets/js/app.js', 'public/js')
4555 . sass ( 'resources/assets/sass/home.scss' , 'public/css' )
4656
4757if ( mix . inProduction ( ) ) {
48- mix . webpackConfig ( {
49- output : {
50- publicPath : "/" ,
51- chunkFilename : 'js/[name].[chunkhash].js'
52- }
53- } )
5458 mix . version ( )
5559}
You can’t perform that action at this time.
0 commit comments