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(
2323 const src = style . src || resourcePath
2424 const attrsQuery = attrsToQuery ( style . attrs , 'css' )
2525 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
2727 // 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 } ` : ``
2929 const prodQuery = isProduction ? `&prod` : ``
3030 const query = `?vue&type=style&index=${ i } ${ idQuery } ${ prodQuery } ${ attrsQuery } ${ inheritQuery } `
3131 return stringifyRequest ( src + query )
You can’t perform that action at this time.
0 commit comments