-
Notifications
You must be signed in to change notification settings - Fork 810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel mix error in lines scss coments #3043
Comments
What's your webpack.mix.js file look like? |
`` let mix = require('laravel-mix'); mix.js('src/js/app.js', 'js') |
Same problem without sass but with Tailwindcss.
And webpack.mix.js mix.js('resources/js/app.js', 'public/js')
.copy('resources/img', 'public/img')
.copy('resources/static', 'public')
.postCss('resources/css/app.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
]); |
Not sure about the author issue, but @Brouilles might be a css-loader version issue. ref #3036 |
Yes I confirm. It is a css-loader issue. If I set to version 5.x, it is working again! |
This is happening due to npm v7.x, which auto installs peer dependency listed in
Larave mix should load webpack loaders like this - {
loader: require.resolve('css-loader'),
options: {
modules: false,
esModule: true,
importLoaders: 2,
}
}, This will force node to resolve the css-loader child package (in this case v5) which was installed along with the parent package itself. See how other packages is doing this |
gah this is really aggravating that we have to do this but it makes sense. I'll see if I can go through and update things tonight and get a release out soon |
I'm trying use laravel-mix a no Laravel project.
Running the "npx mix" return a error in lines comments on .css files.
The text was updated successfully, but these errors were encountered: