@rollup/plugin-node-resolve 15.0.2 → 15.1.0
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/cjs/index.js +13 -6
- package/dist/es/index.js +13 -6
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
@@ -12,7 +12,7 @@ var url = require('url');
|
|
12
12
|
var resolve = require('resolve');
|
13
13
|
var pluginutils = require('@rollup/pluginutils');
|
14
14
|
|
15
|
-
var version = "15.0
|
15
|
+
var version = "15.1.0";
|
16
16
|
var peerDependencies = {
|
17
17
|
rollup: "^2.78.0||^3.0.0"
|
18
18
|
};
|
@@ -1090,11 +1090,18 @@ function nodeResolve(opts = {}) {
|
|
1090
1090
|
importSpecifierList.push(`./${importee}`);
|
1091
1091
|
}
|
1092
1092
|
|
1093
|
-
// TypeScript files may import '.
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1093
|
+
// TypeScript files may import '.mjs' or '.cjs' to refer to either '.mts' or '.cts'.
|
1094
|
+
// They may also import .js to refer to either .ts or .tsx, and .jsx to refer to .tsx.
|
1095
|
+
if (importer && /\.(ts|mts|cts|tsx)$/.test(importer)) {
|
1096
|
+
for (const [importeeExt, resolvedExt] of [
|
1097
|
+
['.js', '.ts'],
|
1098
|
+
['.js', '.tsx'],
|
1099
|
+
['.jsx', '.tsx'],
|
1100
|
+
['.mjs', '.mts'],
|
1101
|
+
['.cjs', '.cts']
|
1102
|
+
]) {
|
1103
|
+
if (importee.endsWith(importeeExt) && extensions.includes(resolvedExt)) {
|
1104
|
+
importSpecifierList.push(importee.slice(0, -importeeExt.length) + resolvedExt);
|
1098
1105
|
}
|
1099
1106
|
}
|
1100
1107
|
}
|
package/dist/es/index.js
CHANGED
@@ -8,7 +8,7 @@ import { pathToFileURL, fileURLToPath } from 'url';
|
|
8
8
|
import resolve$1 from 'resolve';
|
9
9
|
import { createFilter } from '@rollup/pluginutils';
|
10
10
|
|
11
|
-
var version = "15.0
|
11
|
+
var version = "15.1.0";
|
12
12
|
var peerDependencies = {
|
13
13
|
rollup: "^2.78.0||^3.0.0"
|
14
14
|
};
|
@@ -1086,11 +1086,18 @@ function nodeResolve(opts = {}) {
|
|
1086
1086
|
importSpecifierList.push(`./${importee}`);
|
1087
1087
|
}
|
1088
1088
|
|
1089
|
-
// TypeScript files may import '.
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1089
|
+
// TypeScript files may import '.mjs' or '.cjs' to refer to either '.mts' or '.cts'.
|
1090
|
+
// They may also import .js to refer to either .ts or .tsx, and .jsx to refer to .tsx.
|
1091
|
+
if (importer && /\.(ts|mts|cts|tsx)$/.test(importer)) {
|
1092
|
+
for (const [importeeExt, resolvedExt] of [
|
1093
|
+
['.js', '.ts'],
|
1094
|
+
['.js', '.tsx'],
|
1095
|
+
['.jsx', '.tsx'],
|
1096
|
+
['.mjs', '.mts'],
|
1097
|
+
['.cjs', '.cts']
|
1098
|
+
]) {
|
1099
|
+
if (importee.endsWith(importeeExt) && extensions.includes(resolvedExt)) {
|
1100
|
+
importSpecifierList.push(importee.slice(0, -importeeExt.length) + resolvedExt);
|
1094
1101
|
}
|
1095
1102
|
}
|
1096
1103
|
}
|