vite-plugin-vue2 icon indicating copy to clipboard operation
vite-plugin-vue2 copied to clipboard

SASS always exported to css file

Open mjarkk opened this issue 3 years ago • 1 comments

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

mjarkk avatar Apr 28 '21 07:04 mjarkk

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

2096903746 avatar May 31 '21 11:05 2096903746