@hirarijs/loader-ts 1.0.13 → 1.0.14

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.cjs CHANGED
@@ -213466,6 +213466,11 @@ function rewriteImports(code, filename, resolve, debug = false) {
213466
213466
  }
213467
213467
  var extensions = [".ts", ".mts", ".cts", ".js", ".mjs", ".cjs"];
213468
213468
  function runTransform(code, filename, ctx) {
213469
+ const opts = ctx.loaderConfig.pluginOptions?.["@hirarijs/loader-ts"] || {};
213470
+ const ignoreNm = opts.ignoreNodeModules !== false && opts.allowNodeModules !== true;
213471
+ if (ignoreNm && filename.includes("node_modules")) {
213472
+ return { code, continue: true };
213473
+ }
213469
213474
  const pathResolver = createTsResolve(filename, ctx.loaderConfig.debug);
213470
213475
  const rewrittenCode = pathResolver && !filename.includes("node_modules") ? rewriteImports(code, filename, pathResolver, ctx.loaderConfig.debug) : code;
213471
213476
  if (ctx.loaderConfig.debug) {
@@ -213489,7 +213494,7 @@ function runTransform(code, filename, ctx) {
213489
213494
  code: result.code,
213490
213495
  map: result.map,
213491
213496
  format: ctx.format,
213492
- continue: ctx.loaderConfig.pluginOptions?.["@hirarijs/loader-ts"]?.continue === true
213497
+ continue: opts.continue === true
213493
213498
  };
213494
213499
  }
213495
213500
  var plugin = {
package/dist/index.js CHANGED
@@ -213463,6 +213463,11 @@ function rewriteImports(code, filename, resolve, debug = false) {
213463
213463
  }
213464
213464
  var extensions = [".ts", ".mts", ".cts", ".js", ".mjs", ".cjs"];
213465
213465
  function runTransform(code, filename, ctx) {
213466
+ const opts = ctx.loaderConfig.pluginOptions?.["@hirarijs/loader-ts"] || {};
213467
+ const ignoreNm = opts.ignoreNodeModules !== false && opts.allowNodeModules !== true;
213468
+ if (ignoreNm && filename.includes("node_modules")) {
213469
+ return { code, continue: true };
213470
+ }
213466
213471
  const pathResolver = createTsResolve(filename, ctx.loaderConfig.debug);
213467
213472
  const rewrittenCode = pathResolver && !filename.includes("node_modules") ? rewriteImports(code, filename, pathResolver, ctx.loaderConfig.debug) : code;
213468
213473
  if (ctx.loaderConfig.debug) {
@@ -213486,7 +213491,7 @@ function runTransform(code, filename, ctx) {
213486
213491
  code: result.code,
213487
213492
  map: result.map,
213488
213493
  format: ctx.format,
213489
- continue: ctx.loaderConfig.pluginOptions?.["@hirarijs/loader-ts"]?.continue === true
213494
+ continue: opts.continue === true
213490
213495
  };
213491
213496
  }
213492
213497
  var plugin = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hirarijs/loader-ts",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "TypeScript loader plugin for HirariJS loader",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",