feat(css): add exportType url with new URL()#21209
Conversation
🦋 Changeset detectedLatest commit: 6a3a36c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This PR is packaged and the instant preview is available (6a3a36c). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@6a3a36c
yarn add -D webpack@https://pkg.pr.new/webpack@6a3a36c
pnpm add -D webpack@https://pkg.pr.new/webpack@6a3a36c |
Merging this PR will improve performance by 71.87%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (86.50%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #21209 +/- ##
==========================================
- Coverage 92.80% 92.80% -0.01%
==========================================
Files 591 592 +1
Lines 64726 64840 +114
Branches 18040 18080 +40
==========================================
+ Hits 60072 60177 +105
- Misses 4654 4663 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3763319 to
86ea416
Compare
e6d8f87 to
7e22fd1
Compare
474a8bb to
aa75609
Compare
aa75609 to
6a3a36c
Compare
Summary
new URL("./style.css", import.meta.url)withexperiments.cssnow emits a standalone CSS file with@import/url()resolved, and returns its URL to JS. Implements mode D from #14893.new URL("./x.html", import.meta.url)can also be easily extended via theURLEntryPluginhooks.What kind of change does this PR introduce?
feat
Did you add tests for your changes?
Yes,
test/configCases/css/export-type-url/.Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
New
exportType: "url"CSS parser option andURLEntryPlugin.getCompilationHooks()API.Use of AI
AI was used to assist with implementation design, code generation, and test creation.