mix.styles() is excluded in emitted output list also watcher ignores mix.styles
See original GitHub issue- Laravel Mix Version: 0.12.1
- Node Version: 7.10.0
- NPM Version: 4.6.1
- OS: Ubuntu : 14.04
Description:
I installed fresh Laravel 5.4 application. Added simple code to webpack.mix.js
for combining plain css, which is given below in steps. When I run npm run dev
everything goes well also combined file is created but it is not shown in emitted output. Same error goes with npm run watch
, here watcher doesn’t watch styles
file for modifications.
Expected Behaviour
File should be shown in emitted output and watcher should watch for changes in mix.styles
files
Steps To Reproduce:
Below is my webpack.mix.js
mix.js('resources/assets/js/app.js', 'public/js/app.js')
.sass('resources/assets/sass/app.scss', 'public/css/app.css')
.styles([
'resources/assets/application/css/font-awesome.min.css',
'resources/assets/application/css/icofont.css',
'resources/assets/application/css/slidr.css',
'resources/assets/application/css/main.css',
'resources/assets/application/css/responsive.css',
'resources/assets/application/css/presets/preset1.css'
],'public/css/app-bundle.css');
mix.js([
'resources/assets/application/js/price-range.js',
'resources/assets/application/js/main.js',
'resources/assets/application/js/switcher.js'
],'public/js/app-bundle.js');
-
Now run
npm run dev
After successful execution you will see list of emitted files. But in list app-bundle.css will be missing. But files are being successfully combined in app-bundle.css but not shown in list. -
Now run
npm run watch
Watcher will not watch for changes in files provided in mix.styles()
Edit 1
About styles() , scripts(), I agree that they are not run by watch
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top GitHub Comments
Actually
scripts()
andstyles()
are being run in background when you runnpm run watch
. But laravel-mix does not notify about that on terminal. This has been discussed before, seeFixed in 1.0 release, coming in a few days.