Skip to content

Commit e572a25

Browse files
committed
fix(compat): add entities to @vue/compat deps to fix CJS edge cases
Fixes #10609 Unlike the `vue` package, direct dependencies of `@vue/compat` are not externalized: https://github.com/vuejs/core/blob/201936f9a3909ae9dca4e131e1f5ad5a1c0feb77/rollup.config.js#L274 So it depends on `entities` directly in its CJS build, unlike the `vue` one which indirectly depends on it via `@vue/compiler-core`. So `entities` must be explicitly added to `@vue/compat` deps to avoid incorrect dependency resolution due to different `node_modules` layouts, such as in #10609 (comment)
1 parent 201936f commit e572a25

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

packages/compiler-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"dependencies": {
4949
"@babel/parser": "catalog:",
5050
"@vue/shared": "workspace:*",
51-
"entities": "^4.5.0",
51+
"entities": "catalog:",
5252
"estree-walker": "catalog:",
5353
"source-map-js": "catalog:"
5454
},

packages/vue-compat/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"homepage": "https://github.com/vuejs/core/tree/main/packages/vue-compat#readme",
5454
"dependencies": {
5555
"@babel/parser": "catalog:",
56+
"entities": "catalog:",
5657
"estree-walker": "catalog:",
5758
"source-map-js": "catalog:"
5859
},

pnpm-lock.yaml

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ packages:
55
catalog:
66
'@babel/parser': ^7.25.3
77
'@babel/types': ^7.25.2
8+
'entities': '^4.5.0'
89
'estree-walker': ^2.0.2
910
'magic-string': ^0.30.11
1011
'source-map-js': ^1.2.0

0 commit comments

Comments
 (0)