@tinacms/scripts 0.0.0-20240831030337 → 0.0.0-20240831145920
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/index.js +19 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -268,6 +268,14 @@ var buildIt = async (entryPoint, packageJSON) => {
|
|
|
268
268
|
// development, which we don't want to expose our users to.
|
|
269
269
|
external: Object.keys(__spreadValues({}, peerDeps2))
|
|
270
270
|
});
|
|
271
|
+
await (0, import_esbuild.build)({
|
|
272
|
+
entryPoints: [import_node_path.default.join(process.cwd(), entry)],
|
|
273
|
+
bundle: true,
|
|
274
|
+
conditions: ["worker"],
|
|
275
|
+
target: "es2020",
|
|
276
|
+
format: "esm",
|
|
277
|
+
outfile: import_node_path.default.join(process.cwd(), "dist", "index.edge.mjs")
|
|
278
|
+
});
|
|
271
279
|
} else {
|
|
272
280
|
await (0, import_esbuild.build)({
|
|
273
281
|
entryPoints: [import_node_path.default.join(process.cwd(), entry)],
|
|
@@ -277,6 +285,17 @@ var buildIt = async (entryPoint, packageJSON) => {
|
|
|
277
285
|
external,
|
|
278
286
|
target: "node12"
|
|
279
287
|
});
|
|
288
|
+
if (packageJSON.module) {
|
|
289
|
+
await (0, import_esbuild.build)({
|
|
290
|
+
entryPoints: [import_node_path.default.join(process.cwd(), entry)],
|
|
291
|
+
bundle: true,
|
|
292
|
+
platform: "node",
|
|
293
|
+
target: "es2020",
|
|
294
|
+
format: "esm",
|
|
295
|
+
outfile: outInfo.outfile ? import_node_path.default.join(process.cwd(), "dist", `${outInfo.outfile}.mjs`) : import_node_path.default.join(process.cwd(), "dist", "index.mjs"),
|
|
296
|
+
external
|
|
297
|
+
});
|
|
298
|
+
}
|
|
280
299
|
}
|
|
281
300
|
const extension = import_node_path.default.extname(entry);
|
|
282
301
|
await import_fs_extra.default.writeFileSync(
|