sprint-es 0.0.120 → 0.0.122
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/cjs/cli.cjs +11 -2
- package/dist/esm/cli.js +11 -2
- package/package.json +1 -1
package/dist/cjs/cli.cjs
CHANGED
|
@@ -193,15 +193,24 @@ async function buildWithEsbuild(srcPath, distPath, external) {
|
|
|
193
193
|
const requireFromProject = module$1.createRequire(path.join(projectRoot, "package.json"));
|
|
194
194
|
const esbuild = requireFromProject("esbuild");
|
|
195
195
|
const entryPoints = collectEntryPoints(srcPath);
|
|
196
|
+
const forceExternalPlugin = {
|
|
197
|
+
name: "force-external",
|
|
198
|
+
setup(build) {
|
|
199
|
+
build.onResolve({ filter: /^[^./]/ }, (args2) => {
|
|
200
|
+
if (!args2.importer) return null;
|
|
201
|
+
return { path: args2.path, external: true };
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
};
|
|
196
205
|
await esbuild.build({
|
|
197
206
|
entryPoints,
|
|
198
207
|
outdir: distPath,
|
|
199
208
|
outbase: srcPath,
|
|
200
209
|
platform: "node",
|
|
201
210
|
format: "cjs",
|
|
202
|
-
bundle:
|
|
211
|
+
bundle: true,
|
|
203
212
|
sourcemap: true,
|
|
204
|
-
|
|
213
|
+
plugins: [forceExternalPlugin]
|
|
205
214
|
});
|
|
206
215
|
}
|
|
207
216
|
function generateJWTSecret() {
|
package/dist/esm/cli.js
CHANGED
|
@@ -174,15 +174,24 @@ async function buildWithEsbuild(srcPath, distPath, external) {
|
|
|
174
174
|
const requireFromProject = createRequire(join(projectRoot, "package.json"));
|
|
175
175
|
const esbuild = requireFromProject("esbuild");
|
|
176
176
|
const entryPoints = collectEntryPoints(srcPath);
|
|
177
|
+
const forceExternalPlugin = {
|
|
178
|
+
name: "force-external",
|
|
179
|
+
setup(build) {
|
|
180
|
+
build.onResolve({ filter: /^[^./]/ }, (args2) => {
|
|
181
|
+
if (!args2.importer) return null;
|
|
182
|
+
return { path: args2.path, external: true };
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
};
|
|
177
186
|
await esbuild.build({
|
|
178
187
|
entryPoints,
|
|
179
188
|
outdir: distPath,
|
|
180
189
|
outbase: srcPath,
|
|
181
190
|
platform: "node",
|
|
182
191
|
format: "cjs",
|
|
183
|
-
bundle:
|
|
192
|
+
bundle: true,
|
|
184
193
|
sourcemap: true,
|
|
185
|
-
|
|
194
|
+
plugins: [forceExternalPlugin]
|
|
186
195
|
});
|
|
187
196
|
}
|
|
188
197
|
function generateJWTSecret() {
|