diff --git a/.changeset/soft-coats-cover.md b/.changeset/soft-coats-cover.md new file mode 100644 index 0000000000..9ee39dfc1a --- /dev/null +++ b/.changeset/soft-coats-cover.md @@ -0,0 +1,5 @@ +--- +'@ice/app': patch +--- + +move require hijack to createService diff --git a/packages/ice/bin/ice-cli.mjs b/packages/ice/bin/ice-cli.mjs index b9b9dba617..2d07f5eafb 100755 --- a/packages/ice/bin/ice-cli.mjs +++ b/packages/ice/bin/ice-cli.mjs @@ -6,8 +6,6 @@ import fse from 'fs-extra'; import { fileURLToPath } from 'url'; import { program, Option } from 'commander'; import yargsParser from 'yargs-parser'; -// hijack webpack before import other modules -import '../esm/requireHook.js'; import createService from '../esm/createService.js'; import { TARGETS, WEB } from '../esm/constant.js'; diff --git a/packages/ice/src/createService.ts b/packages/ice/src/createService.ts index 6c5aa16bc5..932e0f3276 100644 --- a/packages/ice/src/createService.ts +++ b/packages/ice/src/createService.ts @@ -1,3 +1,5 @@ +// hijack webpack before import other modules +import './requireHook.js'; import * as path from 'path'; import { fileURLToPath } from 'url'; import { createRequire } from 'module';