diff --git a/.changeset/fuzzy-dots-tell.md b/.changeset/fuzzy-dots-tell.md new file mode 100644 index 000000000000..11f72ee6773c --- /dev/null +++ b/.changeset/fuzzy-dots-tell.md @@ -0,0 +1,5 @@ +--- +'@modern-js/plugin-module-node-polyfill': patch +--- + +fix: no bundle globals.js diff --git a/packages/module/plugin-module-node-polyfill/modern.config.js b/packages/module/plugin-module-node-polyfill/modern.config.js index c2bf3e85b393..cb130b77ac2b 100644 --- a/packages/module/plugin-module-node-polyfill/modern.config.js +++ b/packages/module/plugin-module-node-polyfill/modern.config.js @@ -1,5 +1,17 @@ const { tscLikeBuildConfig } = require('@scripts/build'); module.exports = { - buildConfig: tscLikeBuildConfig, + buildConfig: tscLikeBuildConfig.map(config => { + return { + ...config, + input: ['src', '!src/globals.js'], + copy: { + patterns: [ + { + from: 'globals.js', + }, + ], + }, + }; + }), };