Skip to content

Commit f2eefdb

Browse files
committed
.
1 parent 7ba50a0 commit f2eefdb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/cloudflare/src/cli/build/patches/plugins/wrangler-external.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import { dirname, resolve } from "node:path";
1818

1919
import type { PluginBuild } from "esbuild";
2020

21+
import { normalizePath } from "../../utils/normalize-path.js";
22+
2123
export function setWranglerExternal() {
2224
return {
2325
name: "wrangler-externals",
@@ -26,14 +28,16 @@ export function setWranglerExternal() {
2628
const namespace = "wrangler-externals-plugin";
2729

2830
build.onResolve({ filter: /(\.bin|\.wasm\?module)$/ }, ({ path, importer }) => {
31+
console.warn("importer, path, new", importer, path, normalizePath(resolve(dirname(importer), path)));
2932
return {
30-
path: resolve(dirname(importer), path),
33+
path: normalizePath(resolve(dirname(importer), path)),
3134
namespace,
3235
external: true,
3336
};
3437
});
3538

3639
build.onLoad({ filter: /.*/, namespace }, async ({ path }) => {
40+
console.warn("onLoad path", path);
3741
return {
3842
contents: `export * from '${path}';`,
3943
};

0 commit comments

Comments
 (0)