-
-
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
Vue.js SASS Template Style Tag (<style lang="sass">
) Incorrectly Parsed As SCSS
#1211
Comments
I am having the same issue. Is there any way to pass parameter to node-sass while using parcel? |
SCSS and SASS are both being run through node-sass. |
Interestingly enough, if you extract your sass into a separate sass file, and
It just doesn't parse correctly when sass is inline. |
It works fine because now the loader knows the file extension (sass) and correctly parse it as indented syntax (as individual sass files works too), so I believe this is Vue loader/Compiler issue. |
How would I go isolating this issue further? I have time to dive deeper into this now so I'd like to get this working |
Finding a way to use the correct filetype in the sass parser should fix this @enom-infini |
Hi all, amazing project!!!!
Apparently |
@MattAndDev Awesome! Seems like you've found the correct solution. This can also happen on non vue assets (through plugins), that also allow inlining sass in the file. Could you do a PR that changes this line? opts.indentedSyntax = typeof opts.indentedSyntax === 'boolean' ? opts.indentedSyntax : path.extname(this.name).toLowerCase() === '.sass'; Into something like this: let type = this.options.rendition ? this.options.rendition.type : path.extname(this.name).toLowerCase().substring(1);
opts.indentedSyntax = typeof opts.indentedSyntax === 'boolean' ? opts.indentedSyntax : type === 'sass'; |
@DeMoorJasper Sure, I'm more then happy to help! |
@DeMoorJasper
PR coming! |
…er#1211) in assets/SASSAsset.js
🐛 bug report
Some tickets reported similar issues but I have isolated the cause and effect which you can see in my repo https://gitlab.com/enom/parcel-vue-sass
🎛 Configuration (.babelrc, package.json, cli command)
Run the following:
The
<style lang="sass">
is being parsed as SCSS instead of SASS. This is seems like a Webpack configuration where it's not using the right loader rule.I unfortunately don't have time to correct this myself.
🤔 Expected Behavior
Parcel should parse Vue.js template
<style lang="sass">
as SASS😯 Current Behavior
The following error is displayed in console:
💁 Possible Solution
Seems like a missing or misconfigured Webpack loader / rule.
🔦 Context
App development using Parcel, Vue.js, and SASS
💻 Code Sample
See https://gitlab.com/enom/parcel-vue-sass
🌍 Your Environment
The text was updated successfully, but these errors were encountered: