@danielx/civet 0.9.2 → 0.9.3

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.
@@ -369,16 +369,6 @@ var rawPlugin = (options = {}, meta) => {
369
369
  compilerOptions.outDir ?? process.cwd(),
370
370
  filePath
371
371
  );
372
- if (meta.framework === "esbuild") {
373
- fs.mkdirSync(
374
- import_path.default.dirname(
375
- import_path.default.resolve(esbuildOptions.outdir, pathFromDistDir)
376
- ),
377
- {
378
- recursive: true
379
- }
380
- );
381
- }
382
372
  return this.emitFile({
383
373
  source: content,
384
374
  fileName: pathFromDistDir,
@@ -402,9 +392,6 @@ var rawPlugin = (options = {}, meta) => {
402
392
  id = aliasResolver(id);
403
393
  }
404
394
  if (/\0/.test(id)) return null;
405
- if (plugin.__virtualModulePrefix && importer?.startsWith(plugin.__virtualModulePrefix)) {
406
- importer = decodeURIComponent(importer.slice(plugin.__virtualModulePrefix.length));
407
- }
408
395
  let postfix;
409
396
  ({ id, postfix } = cleanCivetId(id));
410
397
  let ref2;
@@ -608,6 +595,9 @@ var rawPlugin = (options = {}, meta) => {
608
595
  },
609
596
  webpack(compiler) {
610
597
  if (implicitExtension) {
598
+ compiler.options ??= {};
599
+ compiler.options.resolve ??= {};
600
+ compiler.options.resolve.extensions ??= ["", ".js", ".json", ".wasm"];
611
601
  compiler.options.resolve.extensions.unshift(".civet");
612
602
  }
613
603
  return aliasResolver = (id) => {
@@ -337,16 +337,6 @@ var rawPlugin = (options = {}, meta) => {
337
337
  compilerOptions.outDir ?? process.cwd(),
338
338
  filePath
339
339
  );
340
- if (meta.framework === "esbuild") {
341
- fs.mkdirSync(
342
- path.dirname(
343
- path.resolve(esbuildOptions.outdir, pathFromDistDir)
344
- ),
345
- {
346
- recursive: true
347
- }
348
- );
349
- }
350
340
  return this.emitFile({
351
341
  source: content,
352
342
  fileName: pathFromDistDir,
@@ -370,9 +360,6 @@ var rawPlugin = (options = {}, meta) => {
370
360
  id = aliasResolver(id);
371
361
  }
372
362
  if (/\0/.test(id)) return null;
373
- if (plugin.__virtualModulePrefix && importer?.startsWith(plugin.__virtualModulePrefix)) {
374
- importer = decodeURIComponent(importer.slice(plugin.__virtualModulePrefix.length));
375
- }
376
363
  let postfix;
377
364
  ({ id, postfix } = cleanCivetId(id));
378
365
  let ref2;
@@ -576,6 +563,9 @@ var rawPlugin = (options = {}, meta) => {
576
563
  },
577
564
  webpack(compiler) {
578
565
  if (implicitExtension) {
566
+ compiler.options ??= {};
567
+ compiler.options.resolve ??= {};
568
+ compiler.options.resolve.extensions ??= ["", ".js", ".json", ".wasm"];
579
569
  compiler.options.resolve.extensions.unshift(".civet");
580
570
  }
581
571
  return aliasResolver = (id) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@danielx/civet",
3
3
  "type": "commonjs",
4
- "version": "0.9.2",
4
+ "version": "0.9.3",
5
5
  "description": "CoffeeScript style syntax for TypeScript",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/main.mjs",
@@ -95,7 +95,7 @@
95
95
  "unplugin": "^2.1.0"
96
96
  },
97
97
  "devDependencies": {
98
- "@danielx/civet": "0.9.0",
98
+ "@danielx/civet": "0.9.2",
99
99
  "@danielx/hera": "^0.8.16",
100
100
  "@prettier/sync": "^0.5.2",
101
101
  "@types/assert": "^1.5.6",