Skip to content

Commit b14de6c

Browse files
committed
wip: fix compiler dep externalization
1 parent 5278e06 commit b14de6c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rollup.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ function createConfig(format, output, plugins = []) {
9191
const isNodeBuild = format === 'cjs'
9292
const isGlobalBuild = /global/.test(format)
9393
const isCompatBuild = !!packageOptions.compat
94+
const isCompatPackage = pkg.name === '@vue/compat'
9495

9596
if (isGlobalBuild) {
9697
output.name = packageOptions.name
@@ -121,15 +122,15 @@ function createConfig(format, output, plugins = []) {
121122
// the compat build needs both default AND named exports. This will cause
122123
// Rollup to complain for non-ESM targets, so we use separate entries for
123124
// esm vs. non-esm builds.
124-
if (isCompatBuild && (isBrowserESMBuild || isBundlerESMBuild)) {
125+
if (isCompatPackage && (isBrowserESMBuild || isBundlerESMBuild)) {
125126
entryFile = /runtime$/.test(format)
126127
? `src/esm-runtime.ts`
127128
: `src/esm-index.ts`
128129
}
129130

130131
let external = []
131132

132-
if (isGlobalBuild || isBrowserESMBuild || isCompatBuild) {
133+
if (isGlobalBuild || isBrowserESMBuild || isCompatPackage) {
133134
if (!packageOptions.enableNonBrowserBranches) {
134135
// normal browser builds - non-browser only imports are tree-shaken,
135136
// they are only listed here to suppress warnings.

0 commit comments

Comments
 (0)