-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Vuejs Component styles not compiling correctly when lang is set to "postcss" #1894
Comments
postcss is just |
@DeMoorJasper Yes but the "pcss" and "css" doesn't give the correct syntax highlighting in VSCode. So it throws errors at just about every line i have a nested CSS statement. When i enter "postcss" it shows the correct syntax highlighting. But then again nothing gets compiled because the VueAsset doesnt recognize it as a PostCSS parsable file i guess. It's just annoying to me as errors & syntax highlighting not working correctly really get on my nerves after a while. Images of the 2 different scenarios in VSCode: https://imgur.com/a/IlJYd2c |
postcss isn't a valid extension, so parcel doesn't recognise it as a css asset |
Just add an entry like this to this file and it should work. Do a PR if you want https://github.com/parcel-bundler/parcel/blob/master/src/Parser.js#L30 |
🐛 bug report
When a Vuejs Component's style tag has the attribute lang="postcss" the styles wont compile at all.
🎛 Configuration (.babelrc, package.json, cli command)
.babelrc
package.json
.postcssrc
🤔 Expected Behavior
Should create a file parsed with postcss.
😯 Current Behavior
No css styles file is produced at all with lang="postcss" but when changed to lang="css" it works. However then the syntax highlighting wont work correctly so seeing errors all over my css code.
No errors are printed and command finishes without a parsed file.
💁 Possible Solution
Change the VueAsset.js to either change lang="postcss" to "css" internally in the generate() function. Or to accknowledge both as postcss parser formats and feed it into the postcss asset.
💻 Code Sample
App.vue
🌍 Your Environment
The text was updated successfully, but these errors were encountered: