@hirarijs/loader-ts 1.0.12 → 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 +7 -1
- package/dist/index.js +7 -1
- package/package.json +1 -1
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) {
|
|
@@ -213488,7 +213493,8 @@ function runTransform(code, filename, ctx) {
|
|
|
213488
213493
|
return {
|
|
213489
213494
|
code: result.code,
|
|
213490
213495
|
map: result.map,
|
|
213491
|
-
format: ctx.format
|
|
213496
|
+
format: ctx.format,
|
|
213497
|
+
continue: opts.continue === true
|
|
213492
213498
|
};
|
|
213493
213499
|
}
|
|
213494
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) {
|
|
@@ -213485,7 +213490,8 @@ function runTransform(code, filename, ctx) {
|
|
|
213485
213490
|
return {
|
|
213486
213491
|
code: result.code,
|
|
213487
213492
|
map: result.map,
|
|
213488
|
-
format: ctx.format
|
|
213493
|
+
format: ctx.format,
|
|
213494
|
+
continue: opts.continue === true
|
|
213489
213495
|
};
|
|
213490
213496
|
}
|
|
213491
213497
|
var plugin = {
|