resolve-url-loader cannot operate: CSS error when using @apply
Problem
I put the following in my `.scss` file: [code block] and after running webpack I can use the classes but I get the following error at the end of the build process: WARNING in ./node_modules/css-loader?{"url":true,"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"sourceMap":true,"ident":"postcss","plugins":[{"version":"6.0.13","plugins":[null,null,null,null,null,null,null,null,null],"postcssPlugin":"tailwind","postcssVersion":"6.0.13"},null,null]}!./node_modules/resolve-url-loader?{"sourceMap":true,"root":"/home/vagrant/gitlab/resources/statamic-site-template/public/site/themes/foundation/node_modules"}!./node_modules/sass-loader/lib/loader.js?{"precision":8,"outputStyle":"expanded","includePaths":["./node_modules/foundation-sites/scss/","./node_modules/font-awesome/scss/","./node_modules/motion-ui/","./node_modules/video.js/src/css/"],"sourceMap":true}!./sass/styles.scss (Emitted value instead of an instance of Error) resolve-url-loader cannot operate: CSS error /home/vagrant/gitlab/resources/statamic-site-template/public/site/themes/foundation/sass/styles.scss:6698:3: missing '}' at error (/home/vagrant/gitlab/resources/statamic-site-template/public/site/themes/foundation/node_modules/css/lib/parse/index.js:62:15) @ ./sass/styles.scss 4:14-245 @ multi ./node_modules/jquery/dist/jquery.min.js ./node_modules/what-input/dist/what-input.min.js ./node_modules/foundation-sites/dist/js/foundation.min.js ./node_modules/motion-ui/motion-ui.js ./node_
Error Output
error at the end of the build process:
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: resolve-url-loader cannot operate: CSS error when using @apply
Hey @thestepafter! This is unfortunately a known issue with `resolve-url-loader` due to one of its dependencies falling over with CSS it doesn't understand, even if it's parseable: https://github.com/bholloway/resolve-url-loader/issues/28 It looks like there are plans to remove the dependency that is causing that issue, but in the mean time, there's two options for working around it: 1. Disable
Trust Score
6 verifications
- 1
Hey @thestepafter! This is unfortunately a known issue with `resolve-url-loader`
Hey @thestepafter! This is unfortunately a known issue with `resolve-url-loader` due to one of its dependencies falling over with CSS it doesn't understand, even if it's parseable:
- 2
https://github.com/bholloway/resolve-url-loader/issues/28
https://github.com/bholloway/resolve-url-loader/issues/28
- 3
It looks like there are plans to remove the dependency that is causing that issu
It looks like there are plans to remove the dependency that is causing that issue, but in the mean time, there's two options for working around it:
- 4
Disable CSS `url()` rewrites in Mix which will disable that plugin:
1. Disable CSS `url()` rewrites in Mix which will disable that plugin:
Validation
Resolved in tailwindlabs/tailwindcss GitHub issue #48. Community reactions: 14 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep