fix(tools): import() requires file:// on windows (#9373)

This commit is contained in:
forehalo
2024-12-27 08:17:58 +00:00
parent 4a3caaf766
commit 67be1fb47f
3 changed files with 4 additions and 5 deletions

View File

@@ -5,6 +5,7 @@
.vscode .vscode
.yarnrc.yml .yarnrc.yml
.docker .docker
**/.storybook
# compiled output # compiled output
.coverage .coverage
@@ -33,5 +34,3 @@ packages/frontend/graphql/src/graphql/index.ts
packages/frontend/graphql/src/schema.ts packages/frontend/graphql/src/schema.ts
packages/frontend/apps/android/App/app/build/** packages/frontend/apps/android/App/app/build/**
blocksuite/tests-legacy/snapshots blocksuite/tests-legacy/snapshots
**/.storybook
**/.coverage

View File

@@ -12,6 +12,7 @@
".vscode", ".vscode",
".yarnrc.yml", ".yarnrc.yml",
".docker", ".docker",
"**/.storybook",
".coverage", ".coverage",
".nx/**", ".nx/**",
"target", "target",
@@ -33,8 +34,7 @@
"packages/frontend/graphql/src/graphql/index.ts", "packages/frontend/graphql/src/graphql/index.ts",
"packages/frontend/graphql/src/schema.ts", "packages/frontend/graphql/src/schema.ts",
"packages/frontend/apps/android/App/app/build/**", "packages/frontend/apps/android/App/app/build/**",
"blocksuite/tests-legacy/snapshots", "blocksuite/tests-legacy/snapshots"
"**/.storybook"
], ],
"rules": { "rules": {
"import/named": "allow", "import/named": "allow",

View File

@@ -58,7 +58,7 @@ export class BundleCommand extends PackageCommand {
.join('webpack.config.ts'); .join('webpack.config.ts');
if (overrideConfigPath.isFile()) { if (overrideConfigPath.isFile()) {
const override = await import(overrideConfigPath.value); const override = await import(overrideConfigPath.toFileUrl().toString());
configOverride = override.config ?? override.default; configOverride = override.config ?? override.default;
} }