Skip to content

Commit cbefe7a

Browse files
committed
Update the esbuild core bundling plugin for the new core v3 exports
1 parent e1b4279 commit cbefe7a

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

packages/cli-v3/src/utilities/build.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function bundleTriggerDevCore(buildIdentifier: string, tsconfigPath?: str
1111
name: "trigger-bundle-core",
1212
setup(build) {
1313
build.onResolve({ filter: /.*/ }, (args) => {
14-
if (args.path !== "@trigger.dev/core/v3") {
14+
if (!args.path.startsWith("@trigger.dev/core/v3")) {
1515
return undefined;
1616
}
1717

@@ -22,18 +22,15 @@ export function bundleTriggerDevCore(buildIdentifier: string, tsconfigPath?: str
2222
triggerSdkPath,
2323
});
2424

25-
const resolvedPath = require.resolve("@trigger.dev/core/v3", {
25+
const resolvedPath = require.resolve(args.path, {
2626
paths: [triggerSdkPath],
2727
});
2828

29-
logger.debug(
30-
`[${buildIdentifier}][trigger-bundle-core] Externalizing @trigger.dev/core/v3`,
31-
{
32-
...args,
33-
triggerSdkPath,
34-
resolvedPath,
35-
}
36-
);
29+
logger.debug(`[${buildIdentifier}][trigger-bundle-core] Externalizing ${args.path}`, {
30+
...args,
31+
triggerSdkPath,
32+
resolvedPath,
33+
});
3734

3835
return {
3936
path: resolvedPath,

0 commit comments

Comments
 (0)