@rollup/plugin-node-resolve 13.3.0 → 14.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/README.md +9 -2
- package/dist/cjs/index.js +62 -32
- package/dist/es/index.js +62 -32
- package/package.json +4 -4
- package/types/index.d.ts +8 -1
- package/CHANGELOG.md +0 -552
package/README.md
CHANGED
@@ -75,7 +75,14 @@ If `true`, instructs the plugin to use the browser module resolutions in `packag
|
|
75
75
|
Type: `Array[...String]`<br>
|
76
76
|
Default: `['node_modules']`
|
77
77
|
|
78
|
-
|
78
|
+
A list of directory names in which to recursively look for modules.
|
79
|
+
|
80
|
+
### `modulePaths`
|
81
|
+
|
82
|
+
Type: `Array[...String]`<br>
|
83
|
+
Default: `[]`
|
84
|
+
|
85
|
+
A list of absolute paths to additional locations to search for modules. [This is analogous to setting the `NODE_PATH` environment variable for node](https://nodejs.org/api/modules.html#loading-from-the-global-folders).
|
79
86
|
|
80
87
|
### `dedupe`
|
81
88
|
|
@@ -214,7 +221,7 @@ export default ({
|
|
214
221
|
})
|
215
222
|
```
|
216
223
|
|
217
|
-
## Resolving
|
224
|
+
## Resolving Require Statements
|
218
225
|
|
219
226
|
According to [NodeJS module resolution](https://nodejs.org/api/packages.html#packages_package_entry_points) `require` statements should resolve using the `require` condition in the package exports field, while es modules should use the `import` condition.
|
220
227
|
|
package/dist/cjs/index.js
CHANGED
@@ -21,7 +21,7 @@ var isModule__default = /*#__PURE__*/_interopDefaultLegacy(isModule);
|
|
21
21
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
22
22
|
var resolve__default = /*#__PURE__*/_interopDefaultLegacy(resolve);
|
23
23
|
|
24
|
-
var version = "
|
24
|
+
var version = "14.1.0";
|
25
25
|
|
26
26
|
util.promisify(fs__default["default"].access);
|
27
27
|
const readFile$1 = util.promisify(fs__default["default"].readFile);
|
@@ -643,6 +643,7 @@ async function resolveIdClassic({
|
|
643
643
|
useBrowserOverrides,
|
644
644
|
baseDir,
|
645
645
|
moduleDirectories,
|
646
|
+
modulePaths,
|
646
647
|
rootDir,
|
647
648
|
ignoreSideEffectsForRoot
|
648
649
|
}) {
|
@@ -677,6 +678,7 @@ async function resolveIdClassic({
|
|
677
678
|
extensions,
|
678
679
|
includeCoreModules: false,
|
679
680
|
moduleDirectory: moduleDirectories,
|
681
|
+
paths: modulePaths,
|
680
682
|
preserveSymlinks,
|
681
683
|
packageFilter: filter
|
682
684
|
};
|
@@ -711,6 +713,7 @@ async function resolveWithExportMap({
|
|
711
713
|
useBrowserOverrides,
|
712
714
|
baseDir,
|
713
715
|
moduleDirectories,
|
716
|
+
modulePaths,
|
714
717
|
rootDir,
|
715
718
|
ignoreSideEffectsForRoot
|
716
719
|
}) {
|
@@ -730,7 +733,8 @@ async function resolveWithExportMap({
|
|
730
733
|
preserveSymlinks,
|
731
734
|
useBrowserOverrides,
|
732
735
|
baseDir,
|
733
|
-
moduleDirectories
|
736
|
+
moduleDirectories,
|
737
|
+
modulePaths
|
734
738
|
});
|
735
739
|
}
|
736
740
|
});
|
@@ -780,6 +784,7 @@ async function resolveWithExportMap({
|
|
780
784
|
extensions,
|
781
785
|
includeCoreModules: false,
|
782
786
|
moduleDirectory: moduleDirectories,
|
787
|
+
paths: modulePaths,
|
783
788
|
preserveSymlinks,
|
784
789
|
packageFilter: filter
|
785
790
|
};
|
@@ -830,6 +835,7 @@ async function resolveWithClassic({
|
|
830
835
|
useBrowserOverrides,
|
831
836
|
baseDir,
|
832
837
|
moduleDirectories,
|
838
|
+
modulePaths,
|
833
839
|
rootDir,
|
834
840
|
ignoreSideEffectsForRoot
|
835
841
|
}) {
|
@@ -847,6 +853,7 @@ async function resolveWithClassic({
|
|
847
853
|
useBrowserOverrides,
|
848
854
|
baseDir,
|
849
855
|
moduleDirectories,
|
856
|
+
modulePaths,
|
850
857
|
rootDir,
|
851
858
|
ignoreSideEffectsForRoot
|
852
859
|
});
|
@@ -875,6 +882,7 @@ async function resolveImportSpecifiers({
|
|
875
882
|
useBrowserOverrides,
|
876
883
|
baseDir,
|
877
884
|
moduleDirectories,
|
885
|
+
modulePaths,
|
878
886
|
rootDir,
|
879
887
|
ignoreSideEffectsForRoot
|
880
888
|
}) {
|
@@ -890,6 +898,7 @@ async function resolveImportSpecifiers({
|
|
890
898
|
useBrowserOverrides,
|
891
899
|
baseDir,
|
892
900
|
moduleDirectories,
|
901
|
+
modulePaths,
|
893
902
|
rootDir,
|
894
903
|
ignoreSideEffectsForRoot
|
895
904
|
});
|
@@ -915,6 +924,7 @@ async function resolveImportSpecifiers({
|
|
915
924
|
useBrowserOverrides,
|
916
925
|
baseDir,
|
917
926
|
moduleDirectories,
|
927
|
+
modulePaths,
|
918
928
|
rootDir,
|
919
929
|
ignoreSideEffectsForRoot
|
920
930
|
});
|
@@ -953,7 +963,7 @@ function nodeResolve(opts = {}) {
|
|
953
963
|
const { warnings } = handleDeprecatedOptions(opts);
|
954
964
|
|
955
965
|
const options = { ...defaults, ...opts };
|
956
|
-
const { extensions, jail, moduleDirectories, ignoreSideEffectsForRoot } = options;
|
966
|
+
const { extensions, jail, moduleDirectories, modulePaths, ignoreSideEffectsForRoot } = options;
|
957
967
|
const conditionsEsm = [...baseConditionsEsm, ...(options.exportConditions || [])];
|
958
968
|
const conditionsCjs = [...baseConditionsCjs, ...(options.exportConditions || [])];
|
959
969
|
const packageInfoCache = new Map();
|
@@ -966,6 +976,12 @@ function nodeResolve(opts = {}) {
|
|
966
976
|
let { dedupe } = options;
|
967
977
|
let rollupOptions;
|
968
978
|
|
979
|
+
if (moduleDirectories.some((name) => name.includes('/'))) {
|
980
|
+
throw new Error(
|
981
|
+
'`moduleDirectories` option must only contain directory names. If you want to load modules from somewhere not supported by the default module resolution algorithm, see `modulePaths`.'
|
982
|
+
);
|
983
|
+
}
|
984
|
+
|
969
985
|
if (typeof dedupe !== 'function') {
|
970
986
|
dedupe = (importee) =>
|
971
987
|
options.dedupe.includes(importee) || options.dedupe.includes(getPackageName(importee));
|
@@ -991,7 +1007,7 @@ function nodeResolve(opts = {}) {
|
|
991
1007
|
const browserMapCache = new Map();
|
992
1008
|
let preserveSymlinks;
|
993
1009
|
|
994
|
-
const
|
1010
|
+
const resolveLikeNode = async (context, importee, importer, custom) => {
|
995
1011
|
// strip query params from import
|
996
1012
|
const [importPath, params] = importee.split('?');
|
997
1013
|
const importSuffix = `${params ? `?${params}` : ''}`;
|
@@ -1076,6 +1092,7 @@ function nodeResolve(opts = {}) {
|
|
1076
1092
|
useBrowserOverrides,
|
1077
1093
|
baseDir,
|
1078
1094
|
moduleDirectories,
|
1095
|
+
modulePaths,
|
1079
1096
|
rootDir,
|
1080
1097
|
ignoreSideEffectsForRoot
|
1081
1098
|
});
|
@@ -1166,39 +1183,52 @@ function nodeResolve(opts = {}) {
|
|
1166
1183
|
isDirCached.clear();
|
1167
1184
|
},
|
1168
1185
|
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1186
|
+
resolveId: {
|
1187
|
+
order: 'post',
|
1188
|
+
async handler(importee, importer, resolveOptions) {
|
1189
|
+
if (importee === ES6_BROWSER_EMPTY) {
|
1190
|
+
return importee;
|
1191
|
+
}
|
1192
|
+
// ignore IDs with null character, these belong to other plugins
|
1193
|
+
if (/\0/.test(importee)) return null;
|
1175
1194
|
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1195
|
+
const { custom = {} } = resolveOptions;
|
1196
|
+
const { 'node-resolve': { resolved: alreadyResolved } = {} } = custom;
|
1197
|
+
if (alreadyResolved) {
|
1198
|
+
return alreadyResolved;
|
1199
|
+
}
|
1179
1200
|
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
//
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1201
|
+
if (/\0/.test(importer)) {
|
1202
|
+
importer = undefined;
|
1203
|
+
}
|
1204
|
+
|
1205
|
+
const resolved = await resolveLikeNode(this, importee, importer, custom);
|
1206
|
+
if (resolved) {
|
1207
|
+
// This way, plugins may attach additional meta information to the
|
1208
|
+
// resolved id or make it external. We do not skip node-resolve here
|
1209
|
+
// because another plugin might again use `this.resolve` in its
|
1210
|
+
// `resolveId` hook, in which case we want to add the correct
|
1211
|
+
// `moduleSideEffects` information.
|
1212
|
+
const resolvedResolved = await this.resolve(resolved.id, importer, {
|
1213
|
+
...resolveOptions,
|
1214
|
+
custom: { ...custom, 'node-resolve': { ...custom['node-resolve'], resolved } }
|
1215
|
+
});
|
1216
|
+
if (resolvedResolved) {
|
1217
|
+
// Handle plugins that manually make the result external
|
1218
|
+
if (resolvedResolved.external) {
|
1219
|
+
return false;
|
1220
|
+
}
|
1221
|
+
// Allow other plugins to take over resolution. Rollup core will not
|
1222
|
+
// change the id if it corresponds to an existing file
|
1223
|
+
if (resolvedResolved.id !== resolved.id) {
|
1224
|
+
return resolvedResolved;
|
1225
|
+
}
|
1226
|
+
// Pass on meta information added by other plugins
|
1227
|
+
return { ...resolved, meta: resolvedResolved.meta };
|
1196
1228
|
}
|
1197
|
-
// Pass on meta information added by other plugins
|
1198
|
-
return { ...resolved, meta: resolvedResolved.meta };
|
1199
1229
|
}
|
1230
|
+
return resolved;
|
1200
1231
|
}
|
1201
|
-
return resolved;
|
1202
1232
|
},
|
1203
1233
|
|
1204
1234
|
load(importee) {
|
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 = "
|
11
|
+
var version = "14.1.0";
|
12
12
|
|
13
13
|
promisify(fs.access);
|
14
14
|
const readFile$1 = promisify(fs.readFile);
|
@@ -630,6 +630,7 @@ async function resolveIdClassic({
|
|
630
630
|
useBrowserOverrides,
|
631
631
|
baseDir,
|
632
632
|
moduleDirectories,
|
633
|
+
modulePaths,
|
633
634
|
rootDir,
|
634
635
|
ignoreSideEffectsForRoot
|
635
636
|
}) {
|
@@ -664,6 +665,7 @@ async function resolveIdClassic({
|
|
664
665
|
extensions,
|
665
666
|
includeCoreModules: false,
|
666
667
|
moduleDirectory: moduleDirectories,
|
668
|
+
paths: modulePaths,
|
667
669
|
preserveSymlinks,
|
668
670
|
packageFilter: filter
|
669
671
|
};
|
@@ -698,6 +700,7 @@ async function resolveWithExportMap({
|
|
698
700
|
useBrowserOverrides,
|
699
701
|
baseDir,
|
700
702
|
moduleDirectories,
|
703
|
+
modulePaths,
|
701
704
|
rootDir,
|
702
705
|
ignoreSideEffectsForRoot
|
703
706
|
}) {
|
@@ -717,7 +720,8 @@ async function resolveWithExportMap({
|
|
717
720
|
preserveSymlinks,
|
718
721
|
useBrowserOverrides,
|
719
722
|
baseDir,
|
720
|
-
moduleDirectories
|
723
|
+
moduleDirectories,
|
724
|
+
modulePaths
|
721
725
|
});
|
722
726
|
}
|
723
727
|
});
|
@@ -767,6 +771,7 @@ async function resolveWithExportMap({
|
|
767
771
|
extensions,
|
768
772
|
includeCoreModules: false,
|
769
773
|
moduleDirectory: moduleDirectories,
|
774
|
+
paths: modulePaths,
|
770
775
|
preserveSymlinks,
|
771
776
|
packageFilter: filter
|
772
777
|
};
|
@@ -817,6 +822,7 @@ async function resolveWithClassic({
|
|
817
822
|
useBrowserOverrides,
|
818
823
|
baseDir,
|
819
824
|
moduleDirectories,
|
825
|
+
modulePaths,
|
820
826
|
rootDir,
|
821
827
|
ignoreSideEffectsForRoot
|
822
828
|
}) {
|
@@ -834,6 +840,7 @@ async function resolveWithClassic({
|
|
834
840
|
useBrowserOverrides,
|
835
841
|
baseDir,
|
836
842
|
moduleDirectories,
|
843
|
+
modulePaths,
|
837
844
|
rootDir,
|
838
845
|
ignoreSideEffectsForRoot
|
839
846
|
});
|
@@ -862,6 +869,7 @@ async function resolveImportSpecifiers({
|
|
862
869
|
useBrowserOverrides,
|
863
870
|
baseDir,
|
864
871
|
moduleDirectories,
|
872
|
+
modulePaths,
|
865
873
|
rootDir,
|
866
874
|
ignoreSideEffectsForRoot
|
867
875
|
}) {
|
@@ -877,6 +885,7 @@ async function resolveImportSpecifiers({
|
|
877
885
|
useBrowserOverrides,
|
878
886
|
baseDir,
|
879
887
|
moduleDirectories,
|
888
|
+
modulePaths,
|
880
889
|
rootDir,
|
881
890
|
ignoreSideEffectsForRoot
|
882
891
|
});
|
@@ -902,6 +911,7 @@ async function resolveImportSpecifiers({
|
|
902
911
|
useBrowserOverrides,
|
903
912
|
baseDir,
|
904
913
|
moduleDirectories,
|
914
|
+
modulePaths,
|
905
915
|
rootDir,
|
906
916
|
ignoreSideEffectsForRoot
|
907
917
|
});
|
@@ -940,7 +950,7 @@ function nodeResolve(opts = {}) {
|
|
940
950
|
const { warnings } = handleDeprecatedOptions(opts);
|
941
951
|
|
942
952
|
const options = { ...defaults, ...opts };
|
943
|
-
const { extensions, jail, moduleDirectories, ignoreSideEffectsForRoot } = options;
|
953
|
+
const { extensions, jail, moduleDirectories, modulePaths, ignoreSideEffectsForRoot } = options;
|
944
954
|
const conditionsEsm = [...baseConditionsEsm, ...(options.exportConditions || [])];
|
945
955
|
const conditionsCjs = [...baseConditionsCjs, ...(options.exportConditions || [])];
|
946
956
|
const packageInfoCache = new Map();
|
@@ -953,6 +963,12 @@ function nodeResolve(opts = {}) {
|
|
953
963
|
let { dedupe } = options;
|
954
964
|
let rollupOptions;
|
955
965
|
|
966
|
+
if (moduleDirectories.some((name) => name.includes('/'))) {
|
967
|
+
throw new Error(
|
968
|
+
'`moduleDirectories` option must only contain directory names. If you want to load modules from somewhere not supported by the default module resolution algorithm, see `modulePaths`.'
|
969
|
+
);
|
970
|
+
}
|
971
|
+
|
956
972
|
if (typeof dedupe !== 'function') {
|
957
973
|
dedupe = (importee) =>
|
958
974
|
options.dedupe.includes(importee) || options.dedupe.includes(getPackageName(importee));
|
@@ -978,7 +994,7 @@ function nodeResolve(opts = {}) {
|
|
978
994
|
const browserMapCache = new Map();
|
979
995
|
let preserveSymlinks;
|
980
996
|
|
981
|
-
const
|
997
|
+
const resolveLikeNode = async (context, importee, importer, custom) => {
|
982
998
|
// strip query params from import
|
983
999
|
const [importPath, params] = importee.split('?');
|
984
1000
|
const importSuffix = `${params ? `?${params}` : ''}`;
|
@@ -1063,6 +1079,7 @@ function nodeResolve(opts = {}) {
|
|
1063
1079
|
useBrowserOverrides,
|
1064
1080
|
baseDir,
|
1065
1081
|
moduleDirectories,
|
1082
|
+
modulePaths,
|
1066
1083
|
rootDir,
|
1067
1084
|
ignoreSideEffectsForRoot
|
1068
1085
|
});
|
@@ -1153,39 +1170,52 @@ function nodeResolve(opts = {}) {
|
|
1153
1170
|
isDirCached.clear();
|
1154
1171
|
},
|
1155
1172
|
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1173
|
+
resolveId: {
|
1174
|
+
order: 'post',
|
1175
|
+
async handler(importee, importer, resolveOptions) {
|
1176
|
+
if (importee === ES6_BROWSER_EMPTY) {
|
1177
|
+
return importee;
|
1178
|
+
}
|
1179
|
+
// ignore IDs with null character, these belong to other plugins
|
1180
|
+
if (/\0/.test(importee)) return null;
|
1162
1181
|
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1182
|
+
const { custom = {} } = resolveOptions;
|
1183
|
+
const { 'node-resolve': { resolved: alreadyResolved } = {} } = custom;
|
1184
|
+
if (alreadyResolved) {
|
1185
|
+
return alreadyResolved;
|
1186
|
+
}
|
1166
1187
|
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
//
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1188
|
+
if (/\0/.test(importer)) {
|
1189
|
+
importer = undefined;
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
const resolved = await resolveLikeNode(this, importee, importer, custom);
|
1193
|
+
if (resolved) {
|
1194
|
+
// This way, plugins may attach additional meta information to the
|
1195
|
+
// resolved id or make it external. We do not skip node-resolve here
|
1196
|
+
// because another plugin might again use `this.resolve` in its
|
1197
|
+
// `resolveId` hook, in which case we want to add the correct
|
1198
|
+
// `moduleSideEffects` information.
|
1199
|
+
const resolvedResolved = await this.resolve(resolved.id, importer, {
|
1200
|
+
...resolveOptions,
|
1201
|
+
custom: { ...custom, 'node-resolve': { ...custom['node-resolve'], resolved } }
|
1202
|
+
});
|
1203
|
+
if (resolvedResolved) {
|
1204
|
+
// Handle plugins that manually make the result external
|
1205
|
+
if (resolvedResolved.external) {
|
1206
|
+
return false;
|
1207
|
+
}
|
1208
|
+
// Allow other plugins to take over resolution. Rollup core will not
|
1209
|
+
// change the id if it corresponds to an existing file
|
1210
|
+
if (resolvedResolved.id !== resolved.id) {
|
1211
|
+
return resolvedResolved;
|
1212
|
+
}
|
1213
|
+
// Pass on meta information added by other plugins
|
1214
|
+
return { ...resolved, meta: resolvedResolved.meta };
|
1183
1215
|
}
|
1184
|
-
// Pass on meta information added by other plugins
|
1185
|
-
return { ...resolved, meta: resolvedResolved.meta };
|
1186
1216
|
}
|
1217
|
+
return resolved;
|
1187
1218
|
}
|
1188
|
-
return resolved;
|
1189
1219
|
},
|
1190
1220
|
|
1191
1221
|
load(importee) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rollup/plugin-node-resolve",
|
3
|
-
"version": "
|
3
|
+
"version": "14.1.0",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"modules"
|
53
53
|
],
|
54
54
|
"peerDependencies": {
|
55
|
-
"rollup": "^2.
|
55
|
+
"rollup": "^2.78.0"
|
56
56
|
},
|
57
57
|
"dependencies": {
|
58
58
|
"@rollup/pluginutils": "^3.1.0",
|
@@ -66,10 +66,10 @@
|
|
66
66
|
"@babel/core": "^7.10.5",
|
67
67
|
"@babel/plugin-transform-typescript": "^7.10.5",
|
68
68
|
"@rollup/plugin-babel": "^5.1.0",
|
69
|
-
"@rollup/plugin-commonjs": "^
|
69
|
+
"@rollup/plugin-commonjs": "^22.0.2",
|
70
70
|
"@rollup/plugin-json": "^4.1.0",
|
71
71
|
"es5-ext": "^0.10.53",
|
72
|
-
"rollup": "^2.
|
72
|
+
"rollup": "^2.78.1",
|
73
73
|
"source-map": "^0.7.3",
|
74
74
|
"string-capitalize": "^1.0.1"
|
75
75
|
},
|
package/types/index.d.ts
CHANGED
@@ -31,11 +31,18 @@ export interface RollupNodeResolveOptions {
|
|
31
31
|
browser?: boolean;
|
32
32
|
|
33
33
|
/**
|
34
|
-
*
|
34
|
+
* A list of directory names in which to recursively look for modules.
|
35
35
|
* @default ['node_modules']
|
36
36
|
*/
|
37
37
|
moduleDirectories?: string[];
|
38
38
|
|
39
|
+
/**
|
40
|
+
* A list of absolute paths to additional locations to search for modules.
|
41
|
+
* This is analogous to setting the `NODE_PATH` environment variable for node.
|
42
|
+
* @default []
|
43
|
+
*/
|
44
|
+
modulePaths?: string[];
|
45
|
+
|
39
46
|
/**
|
40
47
|
* An `Array` of modules names, which instructs the plugin to force resolving for the
|
41
48
|
* specified modules to the root `node_modules`. Helps to prevent bundling the same
|
package/CHANGELOG.md
DELETED
@@ -1,552 +0,0 @@
|
|
1
|
-
# @rollup/plugin-node-resolve ChangeLog
|
2
|
-
|
3
|
-
## v13.3.0
|
4
|
-
|
5
|
-
_2022-05-02_
|
6
|
-
|
7
|
-
### Features
|
8
|
-
|
9
|
-
- feat: support `node:` protocol (#1124)
|
10
|
-
|
11
|
-
## v13.2.2
|
12
|
-
|
13
|
-
_2022-05-02_
|
14
|
-
|
15
|
-
### Bugfixes
|
16
|
-
|
17
|
-
- fix: Respect if other plugins resolve the resolution to a different id (#1181)
|
18
|
-
- fix: Revert respect if other plugins resolve the resolution to a different id (ae59ceb)
|
19
|
-
- fix: Respect if other plugins resolve the resolution to a different id (f8d4c44)
|
20
|
-
|
21
|
-
## v13.2.1
|
22
|
-
|
23
|
-
_2022-04-15_
|
24
|
-
|
25
|
-
### Bugfixes
|
26
|
-
|
27
|
-
- fix: update side effects logic to be deep when glob doesn’t contain `/` (#1148)
|
28
|
-
|
29
|
-
## v13.2.0
|
30
|
-
|
31
|
-
_2022-04-11_
|
32
|
-
|
33
|
-
### Features
|
34
|
-
|
35
|
-
- feat: Add the ability to pass a function into resolveOnly (#1152)
|
36
|
-
|
37
|
-
## v13.1.3
|
38
|
-
|
39
|
-
_2022-01-05_
|
40
|
-
|
41
|
-
### Bugfixes
|
42
|
-
|
43
|
-
- fix: use correct version when published (#1063)
|
44
|
-
|
45
|
-
## v13.1.2
|
46
|
-
|
47
|
-
_2021-12-31_
|
48
|
-
|
49
|
-
### Bugfixes
|
50
|
-
|
51
|
-
- fix: forward meta-information from other plugins (#1062)
|
52
|
-
|
53
|
-
## v13.1.1
|
54
|
-
|
55
|
-
_2021-12-13_
|
56
|
-
|
57
|
-
### Updates
|
58
|
-
|
59
|
-
- test: add tests for mixing custom `exportConditions` with `browser: true` (#1043)
|
60
|
-
|
61
|
-
## v13.1.0
|
62
|
-
|
63
|
-
_2021-12-13_
|
64
|
-
|
65
|
-
### Features
|
66
|
-
|
67
|
-
- feat: expose plugin version (#1050)
|
68
|
-
|
69
|
-
## v13.0.6
|
70
|
-
|
71
|
-
_2021-10-19_
|
72
|
-
|
73
|
-
### Bugfixes
|
74
|
-
|
75
|
-
- fix: pass on isEntry flag (#1016)
|
76
|
-
|
77
|
-
## v13.0.5
|
78
|
-
|
79
|
-
_2021-09-21_
|
80
|
-
|
81
|
-
### Updates
|
82
|
-
|
83
|
-
- docs: fix readme heading depth (#999)
|
84
|
-
|
85
|
-
## v13.0.4
|
86
|
-
|
87
|
-
_2021-07-24_
|
88
|
-
|
89
|
-
### Bugfixes
|
90
|
-
|
91
|
-
- fix: Fix bug where JS import was converted to a TS import, resulting in an error when using export maps (#921)
|
92
|
-
|
93
|
-
## v13.0.3
|
94
|
-
|
95
|
-
_2021-07-24_
|
96
|
-
|
97
|
-
### Bugfixes
|
98
|
-
|
99
|
-
- fix: handle browser-mapped paths correctly in nested contexts (#920)
|
100
|
-
|
101
|
-
## v13.0.2
|
102
|
-
|
103
|
-
_2021-07-15_
|
104
|
-
|
105
|
-
### Bugfixes
|
106
|
-
|
107
|
-
- fix: handle "package.json" being in path (#927)
|
108
|
-
|
109
|
-
## v13.0.1
|
110
|
-
|
111
|
-
_2021-07-15_
|
112
|
-
|
113
|
-
### Updates
|
114
|
-
|
115
|
-
- docs: Document how to get Node.js exports resolution (#884)
|
116
|
-
|
117
|
-
## v13.0.0
|
118
|
-
|
119
|
-
_2021-05-04_
|
120
|
-
|
121
|
-
### Breaking Changes
|
122
|
-
|
123
|
-
- fix!: mark module as external if resolved module is external (#799)
|
124
|
-
|
125
|
-
### Features
|
126
|
-
|
127
|
-
- feat: Follow up to #843, refining exports and browser field interaction (#866)
|
128
|
-
|
129
|
-
## v12.0.0
|
130
|
-
|
131
|
-
_2021-05-04_
|
132
|
-
|
133
|
-
### Breaking Changes
|
134
|
-
|
135
|
-
- fix!: mark module as external if resolved module is external (#799)
|
136
|
-
|
137
|
-
### Features
|
138
|
-
|
139
|
-
- feat: Follow up to #843, refining exports and browser field interaction (#866)
|
140
|
-
|
141
|
-
## v11.2.1
|
142
|
-
|
143
|
-
_2021-03-26_
|
144
|
-
|
145
|
-
### Bugfixes
|
146
|
-
|
147
|
-
- fix: fs.exists is incorrectly promisified (#835)
|
148
|
-
|
149
|
-
## v11.2.0
|
150
|
-
|
151
|
-
_2021-02-14_
|
152
|
-
|
153
|
-
### Features
|
154
|
-
|
155
|
-
- feat: add `ignoreSideEffectsForRoot` option (#694)
|
156
|
-
|
157
|
-
### Updates
|
158
|
-
|
159
|
-
- chore: mark `url` as an external and throw on warning (#783)
|
160
|
-
- docs: clearer "Resolving Built-Ins" doc (#782)
|
161
|
-
|
162
|
-
## v11.1.1
|
163
|
-
|
164
|
-
_2021-01-29_
|
165
|
-
|
166
|
-
### Bugfixes
|
167
|
-
|
168
|
-
- fix: only log last resolve error (#750)
|
169
|
-
|
170
|
-
### Updates
|
171
|
-
|
172
|
-
- docs: add clarification on the order of package entrypoints (#768)
|
173
|
-
|
174
|
-
## v11.1.0
|
175
|
-
|
176
|
-
_2021-01-15_
|
177
|
-
|
178
|
-
### Features
|
179
|
-
|
180
|
-
- feat: support pkg imports and export array (#693)
|
181
|
-
|
182
|
-
## v11.0.1
|
183
|
-
|
184
|
-
_2020-12-14_
|
185
|
-
|
186
|
-
### Bugfixes
|
187
|
-
|
188
|
-
- fix: export map specificity (#675)
|
189
|
-
- fix: add missing type import (#668)
|
190
|
-
|
191
|
-
### Updates
|
192
|
-
|
193
|
-
- docs: corrected word "yse" to "use" (#723)
|
194
|
-
|
195
|
-
## v11.0.0
|
196
|
-
|
197
|
-
_2020-11-30_
|
198
|
-
|
199
|
-
### Breaking Changes
|
200
|
-
|
201
|
-
- refactor!: simplify builtins and remove `customResolveOptions` (#656)
|
202
|
-
- feat!: Mark built-ins as external (#627)
|
203
|
-
- feat!: support package entry points (#540)
|
204
|
-
|
205
|
-
### Bugfixes
|
206
|
-
|
207
|
-
- fix: refactor handling builtins, do not log warning if no local version (#637)
|
208
|
-
|
209
|
-
### Updates
|
210
|
-
|
211
|
-
- docs: fix import statements in examples in README.md (#646)
|
212
|
-
|
213
|
-
## v10.0.0
|
214
|
-
|
215
|
-
_2020-10-27_
|
216
|
-
|
217
|
-
### Breaking Changes
|
218
|
-
|
219
|
-
- fix!: resolve hash in path (#588)
|
220
|
-
|
221
|
-
### Bugfixes
|
222
|
-
|
223
|
-
- fix: do not ignore exceptions (#564)
|
224
|
-
|
225
|
-
## v9.0.0
|
226
|
-
|
227
|
-
_2020-08-13_
|
228
|
-
|
229
|
-
### Breaking Changes
|
230
|
-
|
231
|
-
- chore: update dependencies (e632469)
|
232
|
-
|
233
|
-
### Updates
|
234
|
-
|
235
|
-
- refactor: remove deep-freeze from dependencies (#529)
|
236
|
-
- chore: clean up changelog (84dfddb)
|
237
|
-
|
238
|
-
## v8.4.0
|
239
|
-
|
240
|
-
_2020-07-12_
|
241
|
-
|
242
|
-
### Features
|
243
|
-
|
244
|
-
- feat: preserve search params and hashes (#487)
|
245
|
-
- feat: support .js imports in TypeScript (#480)
|
246
|
-
|
247
|
-
### Updates
|
248
|
-
|
249
|
-
- docs: fix named export use in readme (#456)
|
250
|
-
- docs: correct mainFields valid values (#469)
|
251
|
-
|
252
|
-
## v8.1.0
|
253
|
-
|
254
|
-
_2020-06-22_
|
255
|
-
|
256
|
-
### Features
|
257
|
-
|
258
|
-
- feat: add native node es modules support (#413)
|
259
|
-
|
260
|
-
## v8.0.1
|
261
|
-
|
262
|
-
_2020-06-05_
|
263
|
-
|
264
|
-
### Bugfixes
|
265
|
-
|
266
|
-
- fix: handle nested entry modules with the resolveOnly option (#430)
|
267
|
-
|
268
|
-
## v8.0.0
|
269
|
-
|
270
|
-
_2020-05-20_
|
271
|
-
|
272
|
-
### Breaking Changes
|
273
|
-
|
274
|
-
- feat: Add default export (#361)
|
275
|
-
- feat: export defaults (#301)
|
276
|
-
|
277
|
-
### Bugfixes
|
278
|
-
|
279
|
-
- fix: resolve local files if `resolveOption` is set (#337)
|
280
|
-
|
281
|
-
### Updates
|
282
|
-
|
283
|
-
- docs: correct misspelling (#343)
|
284
|
-
|
285
|
-
## v7.1.3
|
286
|
-
|
287
|
-
_2020-04-12_
|
288
|
-
|
289
|
-
### Bugfixes
|
290
|
-
|
291
|
-
- fix: resolve symlinked entry point properly (#291)
|
292
|
-
|
293
|
-
## v7.1.2
|
294
|
-
|
295
|
-
_2020-04-12_
|
296
|
-
|
297
|
-
### Updates
|
298
|
-
|
299
|
-
- docs: fix url (#289)
|
300
|
-
|
301
|
-
## v7.1.1
|
302
|
-
|
303
|
-
_2020-02-03_
|
304
|
-
|
305
|
-
### Bugfixes
|
306
|
-
|
307
|
-
- fix: main fields regression (#196)
|
308
|
-
|
309
|
-
## v7.1.0
|
310
|
-
|
311
|
-
_2020-02-01_
|
312
|
-
|
313
|
-
### Updates
|
314
|
-
|
315
|
-
- refactor: clean codebase and fix external warnings (#155)
|
316
|
-
|
317
|
-
## v7.0.0
|
318
|
-
|
319
|
-
_2020-01-07_
|
320
|
-
|
321
|
-
### Breaking Changes
|
322
|
-
|
323
|
-
- feat: dedupe by package name (#99)
|
324
|
-
|
325
|
-
## v6.1.0
|
326
|
-
|
327
|
-
_2020-01-04_
|
328
|
-
|
329
|
-
### Bugfixes
|
330
|
-
|
331
|
-
- fix: allow deduplicating custom module dirs (#101)
|
332
|
-
|
333
|
-
### Features
|
334
|
-
|
335
|
-
- feat: add rootDir option (#98)
|
336
|
-
|
337
|
-
### Updates
|
338
|
-
|
339
|
-
- docs: improve doc related to mainFields (#138)
|
340
|
-
|
341
|
-
## 6.0.0
|
342
|
-
|
343
|
-
_2019-11-25_
|
344
|
-
|
345
|
-
- **Breaking:** Minimum compatible Rollup version is 1.20.0
|
346
|
-
- **Breaking:** Minimum supported Node version is 8.0.0
|
347
|
-
- Published as @rollup/plugin-node-resolve
|
348
|
-
|
349
|
-
## 5.2.1 (unreleased)
|
350
|
-
|
351
|
-
- add missing MIT license file ([#233](https://github.com/rollup/rollup-plugin-node-resolve/pull/233) by @kenjiO)
|
352
|
-
- Fix incorrect example of config ([#239](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @myshov)
|
353
|
-
- Fix typo in readme ([#240](https://github.com/rollup/rollup-plugin-node-resolve/pull/240) by @LinusU)
|
354
|
-
|
355
|
-
## 5.2.0 (2019-06-29)
|
356
|
-
|
357
|
-
- dedupe accepts a function ([#225](https://github.com/rollup/rollup-plugin-node-resolve/pull/225) by @manucorporat)
|
358
|
-
|
359
|
-
## 5.1.1 (2019-06-29)
|
360
|
-
|
361
|
-
- Move Rollup version check to buildStart hook to avoid issues ([#232](https://github.com/rollup/rollup-plugin-node-resolve/pull/232) by @lukastaegert)
|
362
|
-
|
363
|
-
## 5.1.0 (2019-06-22)
|
364
|
-
|
365
|
-
- Fix path fragment inputs ([#229](https://github.com/rollup/rollup-plugin-node-resolve/pull/229) by @bterlson)
|
366
|
-
|
367
|
-
## 5.0.4 (2019-06-22)
|
368
|
-
|
369
|
-
- Treat sideEffects array as inclusion list ([#227](https://github.com/rollup/rollup-plugin-node-resolve/pull/227) by @mikeharder)
|
370
|
-
|
371
|
-
## 5.0.3 (2019-06-16)
|
372
|
-
|
373
|
-
- Make empty.js a virtual module ([#224](https://github.com/rollup/rollup-plugin-node-resolve/pull/224) by @manucorporat)
|
374
|
-
|
375
|
-
## 5.0.2 (2019-06-13)
|
376
|
-
|
377
|
-
- Support resolve 1.11.1, add built-in test ([#223](https://github.com/rollup/rollup-plugin-node-resolve/pull/223) by @bterlson)
|
378
|
-
|
379
|
-
## 5.0.1 (2019-05-31)
|
380
|
-
|
381
|
-
- Update to resolve@1.11.0 for better performance ([#220](https://github.com/rollup/rollup-plugin-node-resolve/pull/220) by @keithamus)
|
382
|
-
|
383
|
-
## 5.0.0 (2019-05-15)
|
384
|
-
|
385
|
-
- Replace bublé with babel, update dependencies ([#216](https://github.com/rollup/rollup-plugin-node-resolve/pull/216) by @mecurc)
|
386
|
-
- Handle module side-effects ([#219](https://github.com/rollup/rollup-plugin-node-resolve/pull/219) by @lukastaegert)
|
387
|
-
|
388
|
-
### Breaking Changes
|
389
|
-
|
390
|
-
- Requires at least rollup@1.11.0 to work (v1.12.0 for module side-effects to be respected)
|
391
|
-
- If used with rollup-plugin-commonjs, it should be at least v10.0.0
|
392
|
-
|
393
|
-
## 4.2.4 (2019-05-11)
|
394
|
-
|
395
|
-
- Add note on builtins to Readme ([#215](https://github.com/rollup/rollup-plugin-node-resolve/pull/215) by @keithamus)
|
396
|
-
- Add issue templates ([#217](https://github.com/rollup/rollup-plugin-node-resolve/pull/217) by @mecurc)
|
397
|
-
- Improve performance by caching `isDir` ([#218](https://github.com/rollup/rollup-plugin-node-resolve/pull/218) by @keithamus)
|
398
|
-
|
399
|
-
## 4.2.3 (2019-04-11)
|
400
|
-
|
401
|
-
- Fix ordering of jsnext:main when using the jsnext option ([#209](https://github.com/rollup/rollup-plugin-node-resolve/pull/209) by @lukastaegert)
|
402
|
-
|
403
|
-
## 4.2.2 (2019-04-10)
|
404
|
-
|
405
|
-
- Fix TypeScript typings (rename and export Options interface) ([#206](https://github.com/rollup/rollup-plugin-node-resolve/pull/206) by @Kocal)
|
406
|
-
- Fix mainfields typing ([#207](https://github.com/rollup/rollup-plugin-node-resolve/pull/207) by @nicolashenry)
|
407
|
-
|
408
|
-
## 4.2.1 (2019-04-06)
|
409
|
-
|
410
|
-
- Respect setting the deprecated fields "module", "main", and "jsnext" ([#204](https://github.com/rollup/rollup-plugin-node-resolve/pull/204) by @nick-woodward)
|
411
|
-
|
412
|
-
## 4.2.0 (2019-04-06)
|
413
|
-
|
414
|
-
- Add new mainfields option ([#182](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @keithamus)
|
415
|
-
- Added dedupe option to prevent bundling the same package multiple times ([#201](https://github.com/rollup/rollup-plugin-node-resolve/pull/182) by @sormy)
|
416
|
-
|
417
|
-
## 4.1.0 (2019-04-05)
|
418
|
-
|
419
|
-
- Add TypeScript typings ([#189](https://github.com/rollup/rollup-plugin-node-resolve/pull/189) by @NotWoods)
|
420
|
-
- Update dependencies ([#202](https://github.com/rollup/rollup-plugin-node-resolve/pull/202) by @lukastaegert)
|
421
|
-
|
422
|
-
## 4.0.1 (2019-02-22)
|
423
|
-
|
424
|
-
- Fix issue when external modules are specified in `package.browser` ([#143](https://github.com/rollup/rollup-plugin-node-resolve/pull/143) by @keithamus)
|
425
|
-
- Fix `package.browser` mapping issue when `false` is specified ([#183](https://github.com/rollup/rollup-plugin-node-resolve/pull/183) by @allex)
|
426
|
-
|
427
|
-
## 4.0.0 (2018-12-09)
|
428
|
-
|
429
|
-
This release will support rollup@1.0
|
430
|
-
|
431
|
-
### Features
|
432
|
-
|
433
|
-
- Resolve modules used to define manual chunks ([#185](https://github.com/rollup/rollup-plugin-node-resolve/pull/185) by @mcshaman)
|
434
|
-
- Update dependencies and plugin hook usage ([#187](https://github.com/rollup/rollup-plugin-node-resolve/pull/187) by @lukastaegert)
|
435
|
-
|
436
|
-
## 3.4.0 (2018-09-04)
|
437
|
-
|
438
|
-
This release now supports `.mjs` files by default
|
439
|
-
|
440
|
-
### Features
|
441
|
-
|
442
|
-
- feat: Support .mjs files by default (https://github.com/rollup/rollup-plugin-node-resolve/pull/151, by @leebyron)
|
443
|
-
|
444
|
-
## 3.3.0 (2018-03-17)
|
445
|
-
|
446
|
-
This release adds the `only` option
|
447
|
-
|
448
|
-
### New Features
|
449
|
-
|
450
|
-
- feat: add `only` option (#83; @arantes555)
|
451
|
-
|
452
|
-
### Docs
|
453
|
-
|
454
|
-
- docs: correct description of `jail` option (#120; @GeorgeTaveras1231)
|
455
|
-
|
456
|
-
## 3.2.0 (2018-03-07)
|
457
|
-
|
458
|
-
This release caches reading/statting of files, to improve speed.
|
459
|
-
|
460
|
-
### Performance Improvements
|
461
|
-
|
462
|
-
- perf: cache file stats/reads (#126; @keithamus)
|
463
|
-
|
464
|
-
## 3.0.4 (unreleased)
|
465
|
-
|
466
|
-
- Update lockfile [#137](https://github.com/rollup/rollup-plugin-node-resolve/issues/137)
|
467
|
-
- Update rollup dependency [#138](https://github.com/rollup/rollup-plugin-node-resolve/issues/138)
|
468
|
-
- Enable installation from Github [#142](https://github.com/rollup/rollup-plugin-node-resolve/issues/142)
|
469
|
-
|
470
|
-
## 3.0.3
|
471
|
-
|
472
|
-
- Fix [#130](https://github.com/rollup/rollup-plugin-node-resolve/issues/130) and [#131](https://github.com/rollup/rollup-plugin-node-resolve/issues/131)
|
473
|
-
|
474
|
-
## 3.0.2
|
475
|
-
|
476
|
-
- Ensure `pkg.browser` is an object if necessary ([#129](https://github.com/rollup/rollup-plugin-node-resolve/pull/129))
|
477
|
-
|
478
|
-
## 3.0.1
|
479
|
-
|
480
|
-
- Remove `browser-resolve` dependency ([#127](https://github.com/rollup/rollup-plugin-node-resolve/pull/127))
|
481
|
-
|
482
|
-
## 3.0.0
|
483
|
-
|
484
|
-
- [BREAKING] Remove `options.skip` ([#90](https://github.com/rollup/rollup-plugin-node-resolve/pull/90))
|
485
|
-
- Add `modulesOnly` option ([#96](https://github.com/rollup/rollup-plugin-node-resolve/pull/96))
|
486
|
-
|
487
|
-
## 2.1.1
|
488
|
-
|
489
|
-
- Prevent `jail` from breaking builds on Windows ([#93](https://github.com/rollup/rollup-plugin-node-resolve/issues/93))
|
490
|
-
|
491
|
-
## 2.1.0
|
492
|
-
|
493
|
-
- Add `jail` option ([#53](https://github.com/rollup/rollup-plugin-node-resolve/pull/53))
|
494
|
-
- Add `customResolveOptions` option ([#79](https://github.com/rollup/rollup-plugin-node-resolve/pull/79))
|
495
|
-
- Support symlinked packages ([#82](https://github.com/rollup/rollup-plugin-node-resolve/pull/82))
|
496
|
-
|
497
|
-
## 2.0.0
|
498
|
-
|
499
|
-
- Add support `module` field in package.json as an official alternative to jsnext
|
500
|
-
|
501
|
-
## 1.7.3
|
502
|
-
|
503
|
-
- Error messages are more descriptive ([#50](https://github.com/rollup/rollup-plugin-node-resolve/issues/50))
|
504
|
-
|
505
|
-
## 1.7.2
|
506
|
-
|
507
|
-
- Allow entry point paths beginning with ./
|
508
|
-
|
509
|
-
## 1.7.1
|
510
|
-
|
511
|
-
- Return a `name`
|
512
|
-
|
513
|
-
## 1.7.0
|
514
|
-
|
515
|
-
- Allow relative IDs to be external ([#32](https://github.com/rollup/rollup-plugin-node-resolve/pull/32))
|
516
|
-
|
517
|
-
## 1.6.0
|
518
|
-
|
519
|
-
- Skip IDs containing null character
|
520
|
-
|
521
|
-
## 1.5.0
|
522
|
-
|
523
|
-
- Prefer built-in options, but allow opting out ([#28](https://github.com/rollup/rollup-plugin-node-resolve/pull/28))
|
524
|
-
|
525
|
-
## 1.4.0
|
526
|
-
|
527
|
-
- Pass `options.extensions` through to `node-resolve`
|
528
|
-
|
529
|
-
## 1.3.0
|
530
|
-
|
531
|
-
- `skip: true` skips all packages that don't satisfy the `main` or `jsnext` options ([#16](https://github.com/rollup/rollup-plugin-node-resolve/pull/16))
|
532
|
-
|
533
|
-
## 1.2.1
|
534
|
-
|
535
|
-
- Support scoped packages in `skip` option ([#15](https://github.com/rollup/rollup-plugin-node-resolve/issues/15))
|
536
|
-
|
537
|
-
## 1.2.0
|
538
|
-
|
539
|
-
- Support `browser` field ([#8](https://github.com/rollup/rollup-plugin-node-resolve/issues/8))
|
540
|
-
- Get tests to pass on Windows
|
541
|
-
|
542
|
-
## 1.1.0
|
543
|
-
|
544
|
-
- Use node-resolve to handle various corner cases
|
545
|
-
|
546
|
-
## 1.0.0
|
547
|
-
|
548
|
-
- Add ES6 build, use Rollup 0.20.0
|
549
|
-
|
550
|
-
## 0.1.0
|
551
|
-
|
552
|
-
- First release
|