-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: align the order and content of custom transformer with webpack (#…
…6823) * fix: align the order and content of custom transformer with webpack * chore: changelog
- Loading branch information
Showing
5 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@ice/shared-config': patch | ||
'@ice/bundles': patch | ||
--- | ||
|
||
fix: align the transform order and content with webpack mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,8 @@ | |
"packageManager": "[email protected]", | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"@rspack/[email protected]": "patches/@[email protected]" | ||
"@rspack/[email protected]": "patches/@[email protected]", | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/dist/index.js b/dist/index.js | ||
index 631e1459fbcb948d5089ae5432350c91d9853b5c..00cd831ddaf72e181f6260a99ce40e3ee5220f59 100644 | ||
--- a/dist/index.js | ||
+++ b/dist/index.js | ||
@@ -1535,7 +1535,7 @@ function getRspackPlugin(factory) { | ||
}); | ||
const externalModules = /* @__PURE__ */ new Set(); | ||
if (plugin.load) { | ||
- compiler.options.module.rules.unshift({ | ||
+ compiler.options.module.rules.push({ | ||
enforce: plugin.enforce, | ||
include(id) { | ||
return shouldLoad(id, plugin, externalModules); | ||
@@ -1549,7 +1549,7 @@ function getRspackPlugin(factory) { | ||
}); | ||
} | ||
if (plugin.transform) { | ||
- compiler.options.module.rules.unshift({ | ||
+ compiler.options.module.rules.push({ | ||
enforce: plugin.enforce, | ||
use(data) { | ||
return transformUse(data, plugin, TRANSFORM_LOADER); | ||
diff --git a/dist/index.mjs b/dist/index.mjs | ||
index bca4a4f9ccf06032f8e8af17ec12307c9176b440..5be1848ae866cb181c486b59ecdbf26921b5e5c8 100644 | ||
--- a/dist/index.mjs | ||
+++ b/dist/index.mjs | ||
@@ -1501,7 +1501,7 @@ function getRspackPlugin(factory) { | ||
}); | ||
const externalModules = /* @__PURE__ */ new Set(); | ||
if (plugin.load) { | ||
- compiler.options.module.rules.unshift({ | ||
+ compiler.options.module.rules.push({ | ||
enforce: plugin.enforce, | ||
include(id) { | ||
return shouldLoad(id, plugin, externalModules); | ||
@@ -1515,7 +1515,7 @@ function getRspackPlugin(factory) { | ||
}); | ||
} | ||
if (plugin.transform) { | ||
- compiler.options.module.rules.unshift({ | ||
+ compiler.options.module.rules.push({ | ||
enforce: plugin.enforce, | ||
use(data) { | ||
return transformUse(data, plugin, TRANSFORM_LOADER); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.