When vue is packaged, scoped promotes repeated packaging.

I"m asking about scss files, not vue and js files.

at first I put all the styles in the same style.scss, in which I import a larger big.scss

//style.scss
@import "big.scss"
.other{...}

then use this style.scss in many places and find that the typed css file is super large.

remove the big.scss and you will find that the typed css file is much smaller.

//style.scss
.other{...}

-- 2019.1.14 br-
plus the style of the scoped attribute all have an identity attribute similar to data-v-0a679ea0, which causes css to be repeatedly packaged.

A.vue
<style lang="scss" scoped>
@import "../common.scss";
</style>
B.vue
<style lang="scss" scoped>
@import "../common.scss";
</style>

then I thought, I wish I didn"t write the css code of the public part in scoped

<style lang="scss">
@import "../common.scss";
</style>

<style lang="scss" scoped>
 @import "../common.scss";
.input-container{
  color:$grey
 }

run error report: Undefined variable: "$grey"

without scoped, there is some repetition of the previous class name, and then the style is messed up.
feels that this is a big bug.

Apr.25,2022

https://lry1994.github.io/stu...

find a method


sass-resources-loader
learn about

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb3a07-48234.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb3a07-48234.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?