opentool 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +11 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2608,14 +2608,13 @@ async function transpileWithEsbuild(options) {
|
|
|
2608
2608
|
const buildOptions = {
|
|
2609
2609
|
entryPoints: options.entryPoints,
|
|
2610
2610
|
outdir: tempBase,
|
|
2611
|
-
bundle: false,
|
|
2611
|
+
bundle: options.bundle ?? false,
|
|
2612
2612
|
format: options.format,
|
|
2613
2613
|
platform: "node",
|
|
2614
2614
|
target: "node20",
|
|
2615
2615
|
logLevel: "warning",
|
|
2616
2616
|
sourcesContent: false,
|
|
2617
2617
|
sourcemap: false,
|
|
2618
|
-
packages: "external",
|
|
2619
2618
|
loader: {
|
|
2620
2619
|
".ts": "ts",
|
|
2621
2620
|
".tsx": "tsx",
|
|
@@ -2624,12 +2623,19 @@ async function transpileWithEsbuild(options) {
|
|
|
2624
2623
|
".js": "js",
|
|
2625
2624
|
".jsx": "jsx",
|
|
2626
2625
|
".mjs": "js",
|
|
2627
|
-
".cjs": "js"
|
|
2626
|
+
".cjs": "js",
|
|
2627
|
+
".json": "json"
|
|
2628
2628
|
},
|
|
2629
2629
|
metafile: false,
|
|
2630
2630
|
allowOverwrite: true,
|
|
2631
2631
|
absWorkingDir: projectRoot
|
|
2632
2632
|
};
|
|
2633
|
+
if (options.external && options.external.length > 0) {
|
|
2634
|
+
buildOptions.external = options.external;
|
|
2635
|
+
}
|
|
2636
|
+
if (!buildOptions.bundle) {
|
|
2637
|
+
buildOptions.packages = "external";
|
|
2638
|
+
}
|
|
2633
2639
|
if (tsconfig) {
|
|
2634
2640
|
buildOptions.tsconfig = tsconfig;
|
|
2635
2641
|
}
|