Skip to content

Commit

Permalink
fix: register webpack hook for okam
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Oct 16, 2023
1 parent 12c76c8 commit f594a82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/preset-umi/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ umi build --clean
if (api.config.vite) {
stats = await bundlerVite.build(opts);
} else if (process.env.OKAM) {
require('@umijs/bundler-webpack/dist/requireHook');
const { build } = require(process.env.OKAM);
stats = await build(opts);
} else {
Expand Down
1 change: 1 addition & 0 deletions packages/preset-umi/src/commands/dev/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ PORT=8888 umi dev
if (enableVite) {
await bundlerVite.dev(opts);
} else if (process.env.OKAM) {
require('@umijs/bundler-webpack/dist/requireHook');
const { dev } = require(process.env.OKAM);
await dev(opts);
} else {
Expand Down

0 comments on commit f594a82

Please sign in to comment.