npm list --depth=0) 4.0.16node -v):11.15.0npm -v): 6.9.0build empty css when using .js and .react together
build empty css
mix.react('resources/js/admin/app.js', 'public/js/admin')
.js('resources/js/web/app.js', 'public/js/web')
.sass('resources/sass/web/app.scss', 'public/css/web');
if you comment out .react or .js with sss build correctly
mix.react('resources/js/admin/app.js', 'public/js/admin')
//.js('resources/js/web/app.js', 'public/js/web')
.sass('resources/sass/web/app.scss', 'public/css/web');
or
mix.js('resources/js/web/app.js', 'public/js/web')
.sass('resources/sass/web/app.scss', 'public/css/web');
same here
I'm having the same problem.. It started out of nowhere.
I've tried removing the node_modules folder and running npm install and still spits out an empty css file.
I have the same issue when I use VueJS.
the .extract([vue]) on my config is messing it up.
As by @JeffreyWay https://github.com/JeffreyWay/laravel-mix/issues/2123#issuecomment-500421264 This is because of dynamic imports problem. And till the new webpack released , there is a temporary workaround for this problem by making a separate mix files for js and scss.
Please refere to this comment posted by @vesaka in https://github.com/JeffreyWay/laravel-mix/issues/1914#issuecomment-503392761
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
actual problem
Most helpful comment
As by @JeffreyWay https://github.com/JeffreyWay/laravel-mix/issues/2123#issuecomment-500421264 This is because of dynamic imports problem. And till the new webpack released , there is a temporary workaround for this problem by making a separate mix files for js and scss.
Please refere to this comment posted by @vesaka in https://github.com/JeffreyWay/laravel-mix/issues/1914#issuecomment-503392761