Skip to content

Commit 17a0c37

Browse files
authored
fix: mark sideEffects: true for styles in Vue components (#6597)
See discussions at vuejs/vue-loader#1435
1 parent e41ef41 commit 17a0c37

File tree

1 file changed

+7
-0
lines changed
  • packages/@vue/cli-service/lib/config

1 file changed

+7
-0
lines changed

Diff for: packages/@vue/cli-service/lib/config/base.js

+7
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ module.exports = (api, options) => {
144144
}])
145145
}
146146

147+
// https://github.com/vuejs/vue-loader/issues/1435#issuecomment-869074949
148+
webpackConfig.module
149+
.rule('vue-style')
150+
.test(/\.vue$/)
151+
.resourceQuery(/type=style/)
152+
.sideEffects(true)
153+
147154
// Other common pre-processors ---------------------------------------------
148155
const maybeResolve = name => {
149156
try {

0 commit comments

Comments
 (0)