@hirarijs/loader-ts 1.0.15 → 1.0.16
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 +5 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -213486,8 +213486,12 @@ function rewriteImports(code, filename, resolve, debug = false) {
|
|
|
213486
213486
|
return full.replace(spec, normalized);
|
|
213487
213487
|
});
|
|
213488
213488
|
}
|
|
213489
|
-
var extensions = [".ts", ".mts", ".cts"
|
|
213489
|
+
var extensions = [".ts", ".mts", ".cts"];
|
|
213490
213490
|
function runTransform(code, filename, ctx) {
|
|
213491
|
+
const ext = import_path.default.extname(filename);
|
|
213492
|
+
if (!extensions.includes(ext)) {
|
|
213493
|
+
return { code, continue: true };
|
|
213494
|
+
}
|
|
213491
213495
|
const opts = ctx.loaderConfig.pluginOptions?.["@hirarijs/loader-ts"] || {};
|
|
213492
213496
|
const ignoreNm = opts.ignoreNodeModules !== false && opts.allowNodeModules !== true;
|
|
213493
213497
|
if (ignoreNm && filename.includes("node_modules")) {
|
package/dist/index.js
CHANGED
|
@@ -213483,8 +213483,12 @@ function rewriteImports(code, filename, resolve, debug = false) {
|
|
|
213483
213483
|
return full.replace(spec, normalized);
|
|
213484
213484
|
});
|
|
213485
213485
|
}
|
|
213486
|
-
var extensions = [".ts", ".mts", ".cts"
|
|
213486
|
+
var extensions = [".ts", ".mts", ".cts"];
|
|
213487
213487
|
function runTransform(code, filename, ctx) {
|
|
213488
|
+
const ext = path.extname(filename);
|
|
213489
|
+
if (!extensions.includes(ext)) {
|
|
213490
|
+
return { code, continue: true };
|
|
213491
|
+
}
|
|
213488
213492
|
const opts = ctx.loaderConfig.pluginOptions?.["@hirarijs/loader-ts"] || {};
|
|
213489
213493
|
const ignoreNm = opts.ignoreNodeModules !== false && opts.allowNodeModules !== true;
|
|
213490
213494
|
if (ignoreNm && filename.includes("node_modules")) {
|