We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfddeb6 commit 364ad09Copy full SHA for 364ad09
lib/codegen/styleInjection.js
@@ -23,9 +23,9 @@ module.exports = function genStyleInjectionCode(
23
const src = style.src || resourcePath
24
const attrsQuery = attrsToQuery(style.attrs, 'css')
25
const inheritQuery = `&${loaderContext.resourceQuery.slice(1)}`
26
- // make sure to only pass id when necessary so that we don't inject
+ // make sure to only pass id not src importing so that we don't inject
27
// duplicate tags when multiple components import the same css file
28
- const idQuery = style.scoped ? `&id=${id}` : ``
+ const idQuery = !style.src || style.scoped ? `&id=${id}` : ``
29
const prodQuery = isProduction ? `&prod` : ``
30
const query = `?vue&type=style&index=${i}${idQuery}${prodQuery}${attrsQuery}${inheritQuery}`
31
return stringifyRequest(src + query)
0 commit comments