File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ module.exports = function genStyleInjectionCode(
23
23
const src = style . src || resourcePath
24
24
const attrsQuery = attrsToQuery ( style . attrs , 'css' )
25
25
const inheritQuery = `&${ loaderContext . resourceQuery . slice ( 1 ) } `
26
- // make sure to only pass id when necessary so that we don't inject
26
+ // make sure to only pass id not src importing so that we don't inject
27
27
// duplicate tags when multiple components import the same css file
28
- const idQuery = style . scoped ? `&id=${ id } ` : ``
28
+ const idQuery = ! style . src || style . scoped ? `&id=${ id } ` : ``
29
29
const prodQuery = isProduction ? `&prod` : ``
30
30
const query = `?vue&type=style&index=${ i } ${ idQuery } ${ prodQuery } ${ attrsQuery } ${ inheritQuery } `
31
31
return stringifyRequest ( src + query )
You can’t perform that action at this time.
0 commit comments