@rollup/plugin-commonjs 22.0.0-12 → 22.0.0-13
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 +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +3 -3
- package/dist/es/index.js.map +1 -1
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { walk } from 'estree-walker';
|
|
|
7
7
|
import MagicString from 'magic-string';
|
|
8
8
|
import isReference from 'is-reference';
|
|
9
9
|
|
|
10
|
-
var version = "22.0.0-
|
|
10
|
+
var version = "22.0.0-13";
|
|
11
11
|
var peerDependencies = {
|
|
12
12
|
rollup: "^2.68.0"
|
|
13
13
|
};
|
|
@@ -658,7 +658,7 @@ function getRequireResolver(extensions, detectCyclesAndConditional) {
|
|
|
658
658
|
resolvedSources,
|
|
659
659
|
meta: { commonjs: parentMeta }
|
|
660
660
|
}) {
|
|
661
|
-
// We explicitly track ES modules to handle
|
|
661
|
+
// We explicitly track ES modules to handle circular imports
|
|
662
662
|
if (!(parentMeta && parentMeta.isCommonJS)) knownCjsModuleTypes[parentId] = false;
|
|
663
663
|
if (isWrappedId(parentId, ES_IMPORT_SUFFIX)) return false;
|
|
664
664
|
const parentRequires = parentMeta && parentMeta.requires;
|
|
@@ -693,7 +693,7 @@ function getRequireResolver(extensions, detectCyclesAndConditional) {
|
|
|
693
693
|
await Promise.all(
|
|
694
694
|
Object.keys(resolvedSources)
|
|
695
695
|
.map((source) => resolvedSources[source])
|
|
696
|
-
.filter(({ id }) => !parentRequireSet.has(id))
|
|
696
|
+
.filter(({ id, external }) => !(external || parentRequireSet.has(id)))
|
|
697
697
|
.map(async (resolved) => {
|
|
698
698
|
if (isWrappedId(resolved.id, ES_IMPORT_SUFFIX)) {
|
|
699
699
|
return (
|