@danielx/civet 0.6.80 → 0.6.82
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/browser.js +550 -480
- package/dist/esbuild.js +19 -17
- package/dist/main.js +550 -480
- package/dist/main.mjs +550 -480
- package/dist/rollup.js +19 -17
- package/dist/unplugin-shared.mjs +19 -17
- package/dist/unplugin.js +19 -17
- package/dist/vite.js +19 -17
- package/dist/webpack.js +19 -17
- package/package.json +1 -1
package/dist/esbuild.js
CHANGED
|
@@ -247,6 +247,14 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
247
247
|
compilerOptions.outDir ?? process.cwd(),
|
|
248
248
|
filePath
|
|
249
249
|
);
|
|
250
|
+
if (meta.framework === "esbuild") {
|
|
251
|
+
fs.mkdirSync(
|
|
252
|
+
import_path.default.dirname(
|
|
253
|
+
import_path.default.resolve(esbuildOptions.outdir, pathFromDistDir)
|
|
254
|
+
),
|
|
255
|
+
{ recursive: true }
|
|
256
|
+
);
|
|
257
|
+
}
|
|
250
258
|
this.emitFile({
|
|
251
259
|
source: content,
|
|
252
260
|
fileName: pathFromDistDir,
|
|
@@ -254,13 +262,18 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
254
262
|
});
|
|
255
263
|
},
|
|
256
264
|
void 0,
|
|
265
|
+
true,
|
|
266
|
+
// emitDtsOnly
|
|
267
|
+
void 0,
|
|
268
|
+
// @ts-ignore @internal interface
|
|
257
269
|
true
|
|
270
|
+
// forceDtsEmit
|
|
258
271
|
);
|
|
259
272
|
}
|
|
260
273
|
}
|
|
261
274
|
}
|
|
262
275
|
},
|
|
263
|
-
resolveId(id, importer) {
|
|
276
|
+
resolveId(id, importer, options2) {
|
|
264
277
|
if (/\0/.test(id))
|
|
265
278
|
return null;
|
|
266
279
|
id = cleanCivetId(id);
|
|
@@ -275,6 +288,9 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
275
288
|
return null;
|
|
276
289
|
resolvedId = implicitId;
|
|
277
290
|
}
|
|
291
|
+
if (options2.scan && meta.framework === "vite") {
|
|
292
|
+
resolvedId = `\0${resolvedId}`;
|
|
293
|
+
}
|
|
278
294
|
return resolvedId + outExt;
|
|
279
295
|
},
|
|
280
296
|
loadInclude(id) {
|
|
@@ -376,25 +392,11 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
376
392
|
},
|
|
377
393
|
vite: {
|
|
378
394
|
config(config) {
|
|
379
|
-
var _a
|
|
395
|
+
var _a;
|
|
380
396
|
rootDir = import_path.default.resolve(process.cwd(), config.root ?? "");
|
|
381
|
-
config.optimizeDeps ?? (config.optimizeDeps = {});
|
|
382
|
-
(_a = config.optimizeDeps).esbuildOptions ?? (_a.esbuildOptions = {});
|
|
383
|
-
(_b = config.optimizeDeps.esbuildOptions).plugins ?? (_b.plugins = []);
|
|
384
|
-
config.optimizeDeps.esbuildOptions.plugins.push(
|
|
385
|
-
// @ts-ignore esbuild types from Vite might not match our esbuild
|
|
386
|
-
unplugin.esbuild({
|
|
387
|
-
...options,
|
|
388
|
-
js: void 0,
|
|
389
|
-
ts: "preserve",
|
|
390
|
-
dts: void 0,
|
|
391
|
-
emitDeclaration: false,
|
|
392
|
-
typecheck: false
|
|
393
|
-
})
|
|
394
|
-
);
|
|
395
397
|
if (implicitExtension) {
|
|
396
398
|
config.resolve ?? (config.resolve = {});
|
|
397
|
-
(
|
|
399
|
+
(_a = config.resolve).extensions ?? (_a.extensions = []);
|
|
398
400
|
config.resolve.extensions.push(".civet");
|
|
399
401
|
}
|
|
400
402
|
},
|