-
-
Notifications
You must be signed in to change notification settings - Fork 596
PostCSS appropriate loader #1330
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
Comments
If I recall correctly, this was fixed in vue-cli. Can't vuepress fix it by using latest vue-loader which should handle |
I'm not using "devDependencies": {
"@symfony/webpack-encore": "^0.27.0",
"autoprefixer": "^9.5.1",
"core-js": "^3.0.0",
"postcss-custom-properties": "^8.0.10",
"postcss-font-magician": "^2.2.1",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"postcss-nested": "^4.1.2",
"tailwindcss": "^1.0.3",
"vue-loader": "15.0.11",
"vue-template-compiler": "^2.6.10",
"webpack-notifier": "^1.6.0"
}``` |
You'll likely configure https://vue-loader.vuejs.org/guide/pre-processors.html#postcss with a test like |
Well that was a pretty simple fix. Thank you very much! With Webpack Encore, just add the following: .addLoader({
test: /\.postcss$/,
use: [
'vue-style-loader',
{
loader: 'css-loader',
options: { importLoaders: 1 }
},
'postcss-loader'
]
}) I do think though that it should be added into the |
Info
Problem
Using this code:
I get this error:
I have seen numerous GitHub issues concerning this problem (#792, #506, vuejs/vue-cli#1259, stylelint/stylelint#3348) but although most of them are closed/solved, the fix is not to be seen anywhere, or at least I could not find it. I believe something is missing in the documentations.
Reproduction
To reproduce the issue, have Webpack Encore installed with the following relevant config:
Which produces this Webpack config (it's exported with
console.log
, hence the bad formatting):If someone knows how to fix that and/or can point me to a piece of documentation I missed, or otherwise correct the documentation, it would be appreciated. :)
The text was updated successfully, but these errors were encountered: