Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app-tools): the router-plugin should update source-map #4078

Merged
merged 5 commits into from
Jun 29, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: the router-plugin should update source-map
  • Loading branch information
yimingjfe committed Jun 29, 2023
commit 1fff8d7b702f521c76f06686129d0ca81b79ea90
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ type Compiler = webpack.Compiler | Rspack.Compiler;

export class RouterPlugin {
private isTargetNodeOrWebWorker(target: Compiler['options']['target']) {
return (
if (
target === 'node' ||
(Array.isArray(target) && target.includes('node')) ||
(Array.isArray(target) && target.includes('node'))
) {
return true;
}

if (
target === 'webworker' ||
(Array.isArray(target) && target.includes('webworker'))
);
) {
return true;
}
return false;
}

apply(compiler: Compiler) {
Expand Down Expand Up @@ -184,6 +192,8 @@ export class RouterPlugin {
})();
`;

console.log('iiiiiiiii');

const entrypointsArray = Array.from(
compilation.entrypoints.entries() as IterableIterator<
[string, unknown]
Expand Down
Loading