Skip to content

Commit

Permalink
fix(module): keep version for node ESM package (#13922)
Browse files Browse the repository at this point in the history
Module federation needs package version for comparison

fixes #12433
  • Loading branch information
ZakrepaShe authored and billyvg committed Oct 17, 2024
1 parent 0248545 commit 0954403
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev-packages/rollup-utils/plugins/make-esm-plugin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ export function makePackageNodeEsm() {

const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, 'utf-8'));
const sideEffects = packageJSON.sideEffects;
// For module federation we need to keep the version of the package
const version = packageJSON.version;

const newPackageJSON = {
type: 'module',
version,
sideEffects,
};

Expand Down

0 comments on commit 0954403

Please sign in to comment.