Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(v15): loaders for styles are not deduplicated when experiments.css is true#2071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
xc2 wants to merge1 commit intovuejs:master
base:master
Choose a base branch
Loading
fromxc2:fix-duplicate-style-loaders

Conversation

xc2
Copy link

@xc2xc2 commentedApr 15, 2024

relatedweb-infra-dev/rsbuild#2093

cause:

genRequest who does the deduplicating is not called for the branch forexperiments.css === true

if(isWebpack5&&this._compiler.options.experiments&&this._compiler.options.experiments.css){
// If user enables `experiments.css`, then we are trying to emit css code directly.
// Although we can target requests like `xxx.vue?type=style` to match `type: "css"`,
// it will make the plugin a mess.
if(!options.experimentalInlineMatchResource){
this.emitError(
newError(
'`experimentalInlineMatchResource` should be enabled if `experiments.css` enabled currently'
)
)
return''
}
if(query.inline||query.module){
this.emitError(
newError(
'`inline` or `module` is currently not supported with `experiments.css` enabled'
)
)
return''
}
constloaderString=[stylePostLoaderPath, ...loaders]
.map((loader)=>{
returntypeofloader==='string' ?loader :loader.request
})
.join('!')
conststyleRequest=loaderUtils.stringifyRequest(
this,
`${this.resourcePath}${query.lang ?`.${query.lang}` :''}${
this.resourceQuery
}!=!-!${loaderString}!${this.resourcePath+this.resourceQuery}`
)
return`@import${styleRequest};`
}

chenjiahan reacted with thumbs up emoji
@xc2xc2 changed the titlefix: loaders for styles are not deduplicated when experiments.css is truefix(v15): loaders for styles are not deduplicated when experiments.css is trueApr 15, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@xc2

[8]ページ先頭

©2009-2025 Movatter.jp