@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/CHANGELOG.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1668,6 +1668,7 @@ function commonjs(options = {}) {
|
|
|
1668
1668
|
ignoreGlobal,
|
|
1669
1669
|
ignoreDynamicRequires,
|
|
1670
1670
|
requireReturnsDefault: requireReturnsDefaultOption,
|
|
1671
|
+
defaultIsModuleExports: defaultIsModuleExportsOption,
|
|
1671
1672
|
esmExternals
|
|
1672
1673
|
} = options;
|
|
1673
1674
|
const getRequireReturnsDefault =
|
|
@@ -1681,8 +1682,11 @@ function commonjs(options = {}) {
|
|
|
1681
1682
|
: Array.isArray(esmExternals)
|
|
1682
1683
|
? ((esmExternalIds = new Set(esmExternals)), (id) => esmExternalIds.has(id))
|
|
1683
1684
|
: () => esmExternals;
|
|
1684
|
-
const
|
|
1685
|
-
typeof
|
|
1685
|
+
const getDefaultIsModuleExports =
|
|
1686
|
+
typeof defaultIsModuleExportsOption === 'function'
|
|
1687
|
+
? defaultIsModuleExportsOption
|
|
1688
|
+
: () =>
|
|
1689
|
+
typeof defaultIsModuleExportsOption === 'boolean' ? defaultIsModuleExportsOption : 'auto';
|
|
1686
1690
|
|
|
1687
1691
|
const { dynamicRequireModuleSet, dynamicRequireModuleDirPaths } = getDynamicRequirePaths(
|
|
1688
1692
|
options.dynamicRequireTargets
|
|
@@ -1771,7 +1775,7 @@ function commonjs(options = {}) {
|
|
|
1771
1775
|
disableWrap,
|
|
1772
1776
|
commonDir,
|
|
1773
1777
|
ast,
|
|
1774
|
-
|
|
1778
|
+
getDefaultIsModuleExports(id)
|
|
1775
1779
|
);
|
|
1776
1780
|
}
|
|
1777
1781
|
|