vite-plugin-vue2
vite-plugin-vue2 copied to clipboard
SASS always exported to css file
Why is lang="scss"
always exported to a css file and how can i change it to be inlined in the js file?
This has been bothering me for the last few days and i just cannot find why this is happening nor how to change this.
So this is how it currently seems to work:
Code | Result |
---|---|
<style> |
Exported to separate css file |
<style scoped> |
css inlined in JS |
<style lang="scss"> |
Exported to separate css file |
<style lang="scss" scoped> |
Exported to separate css file |
https://github.com/vitejs/vite/blob/a30724c8a492016a3f4fd1b209975b49e6972135/packages/vite/src/node/plugins/css.ts#L359
https://github.com/vitejs/vite/blob/a30724c8a492016a3f4fd1b209975b49e6972135/packages/vite/src/node/plugins/css.ts#L376