Skip to content

Commit 4091b3e

Browse files
committed
fix: windows build path filter
1 parent 9449a5b commit 4091b3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/submodule-optimizer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function submoduleOptimizer(config: BuildConfig) {
5151
// throws an error if files from src/core are loaded, except for some allowed imports
5252
name: 'forbid-core',
5353
setup(build) {
54-
build.onLoad({ filter: /src\/core\// }, (args) => {
54+
build.onLoad({ filter: /src(\/|\\)core(\/|\\)/ }, (args) => {
5555
if (args.path.includes('util') || args.path.includes('shared')) {
5656
return null;
5757
}

scripts/submodule-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export async function submoduleServer(config: BuildConfig) {
4848
// throws an error if files from src/core are loaded, except for some allowed imports
4949
name: 'forbid-core',
5050
setup(build) {
51-
build.onLoad({ filter: /src\/core\// }, (args) => {
51+
build.onLoad({ filter: /src(\/|\\)core(\/|\\)/ }, (args) => {
5252
if (args.path.includes('util') || args.path.includes('shared')) {
5353
return null;
5454
}

0 commit comments

Comments
 (0)