Skip to content

Commit ab0f8b2

Browse files
costinsinconico974
andauthored
[windows] Add Windows compatibility for the resolve ESBuild plugin (#461)
* [windows] Add Windows compatibility for the `resolve` ESBuild plugin Previously, the separator for the filter regex was hardcoded to / (Unix separator). Now, we're also taking account for the \ (Windows separator) in the filter regex. Signed-off-by: Costin Sin <sin.costinrobert@gmail.com> * Create popular-kids-beam.md --------- Signed-off-by: Costin Sin <sin.costinrobert@gmail.com> Co-authored-by: conico974 <nicodorseuil@yahoo.fr>
1 parent e2d0c7f commit ab0f8b2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/popular-kids-beam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"open-next": patch
3+
---
4+
5+
[windows] Add Windows compatibility for the `resolve` ESBuild plugin

packages/open-next/src/plugins/resolve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function openNextResolvePlugin({
4444
name: "opennext-resolve",
4545
setup(build) {
4646
logger.debug(`OpenNext Resolve plugin for ${fnName}`);
47-
build.onLoad({ filter: /core\/resolve.js/g }, async (args) => {
47+
build.onLoad({ filter: /core(\/|\\)resolve\.js/g }, async (args) => {
4848
let contents = readFileSync(args.path, "utf-8");
4949
//TODO: refactor this. Every override should be at the same place so we can generate this dynamically
5050
if (overrides?.wrapper) {

0 commit comments

Comments
 (0)