@danielx/civet 0.7.1 → 0.7.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/astro.js CHANGED
@@ -165,7 +165,10 @@ var rawPlugin = (options = {}, meta) => {
165
165
  });
166
166
  const compiledTS = import_civet.default.compile(rawCivetSource, {
167
167
  filename,
168
- js: false
168
+ js: false,
169
+ parseOptions: {
170
+ comptime: Boolean(options.comptime)
171
+ }
169
172
  });
170
173
  fsMap.set(filename, compiledTS);
171
174
  return compiledTS;
@@ -310,17 +313,22 @@ var rawPlugin = (options = {}, meta) => {
310
313
  const rawCivetSource = await fs.promises.readFile(filename, "utf-8");
311
314
  this.addWatchFile(filename);
312
315
  let compiled;
316
+ const civetOptions = {
317
+ filename: id,
318
+ sourceMap: true,
319
+ parseOptions: {
320
+ comptime: Boolean(options.comptime)
321
+ }
322
+ };
313
323
  if (options.ts === "civet" && !transformTS) {
314
324
  compiled = import_civet.default.compile(rawCivetSource, {
315
- filename: id,
316
- js: true,
317
- sourceMap: true
325
+ ...civetOptions,
326
+ js: true
318
327
  });
319
328
  } else {
320
329
  const compiledTS = import_civet.default.compile(rawCivetSource, {
321
- filename: id,
322
- js: false,
323
- sourceMap: true
330
+ ...civetOptions,
331
+ js: false
324
332
  });
325
333
  const resolved = filename + outExt;
326
334
  sourceMaps.set(
@@ -365,9 +373,8 @@ var rawPlugin = (options = {}, meta) => {
365
373
  case "civet":
366
374
  default: {
367
375
  compiled = import_civet.default.compile(rawCivetSource, {
368
- filename: id,
369
- js: true,
370
- sourceMap: true
376
+ ...civetOptions,
377
+ js: true
371
378
  });
372
379
  if (options.ts == void 0) {
373
380
  console.log(