Skip to content

Commit

Permalink
fix: 🐛 mfsu 依赖构建不使用 CopyPlugin (#9751)
Browse files Browse the repository at this point in the history
* fix: 🐛 mfsu 依赖构建不使用 CopyPlugin

* refactor: 🎨 change config name to disableCopy

Co-authored-by: pshu <pishu.spf@antfin.com>
  • Loading branch information
stormslowly and stormslowly committed Nov 17, 2022
1 parent 2d0ed66 commit 549639f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/bundler-webpack/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export interface IOpts {
cacheDirectory?: string;
};
pkg?: Record<string, any>;
disableCopy?: boolean;
}

export async function getConfig(opts: IOpts): Promise<Configuration> {
Expand Down Expand Up @@ -187,7 +188,9 @@ export async function getConfig(opts: IOpts): Promise<Configuration> {
// fork-ts-checker
await addForkTSCheckerPlugin(applyOpts);
// copy
await addCopyPlugin(applyOpts);
if (!opts.disableCopy) {
await addCopyPlugin(applyOpts);
}
// manifest
await addManifestPlugin(applyOpts);
// hmr
Expand Down
1 change: 1 addition & 0 deletions packages/bundler-webpack/src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export async function dev(opts: IOpts) {
env: Env.development,
entry: opts.entry,
userConfig: opts.config,
disableCopy: true,
hash: true,
staticPathPrefix: MF_DEP_PREFIX,
name: MFSU_NAME,
Expand Down

0 comments on commit 549639f

Please sign in to comment.