@rollup/plugin-commonjs 21.0.3 → 21.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/CHANGELOG.md +8 -0
- package/dist/index.es.js +7 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +8 -0
package/dist/index.js
CHANGED
|
@@ -1677,6 +1677,7 @@ function commonjs(options = {}) {
|
|
|
1677
1677
|
ignoreGlobal,
|
|
1678
1678
|
ignoreDynamicRequires,
|
|
1679
1679
|
requireReturnsDefault: requireReturnsDefaultOption,
|
|
1680
|
+
defaultIsModuleExports: defaultIsModuleExportsOption,
|
|
1680
1681
|
esmExternals
|
|
1681
1682
|
} = options;
|
|
1682
1683
|
const getRequireReturnsDefault =
|
|
@@ -1690,8 +1691,11 @@ function commonjs(options = {}) {
|
|
|
1690
1691
|
: Array.isArray(esmExternals)
|
|
1691
1692
|
? ((esmExternalIds = new Set(esmExternals)), (id) => esmExternalIds.has(id))
|
|
1692
1693
|
: () => esmExternals;
|
|
1693
|
-
const
|
|
1694
|
-
typeof
|
|
1694
|
+
const getDefaultIsModuleExports =
|
|
1695
|
+
typeof defaultIsModuleExportsOption === 'function'
|
|
1696
|
+
? defaultIsModuleExportsOption
|
|
1697
|
+
: () =>
|
|
1698
|
+
typeof defaultIsModuleExportsOption === 'boolean' ? defaultIsModuleExportsOption : 'auto';
|
|
1695
1699
|
|
|
1696
1700
|
const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(
|
|
1697
1701
|
options.dynamicRequireTargets
|
|
@@ -1780,7 +1784,7 @@ function commonjs(options = {}) {
|
|
|
1780
1784
|
disableWrap,
|
|
1781
1785
|
commonDir,
|
|
1782
1786
|
ast,
|
|
1783
|
-
|
|
1787
|
+
getDefaultIsModuleExports(id)
|
|
1784
1788
|
);
|
|
1785
1789
|
}
|
|
1786
1790
|
|