Skip to content

Commit 82b8d91

Browse files
committed
Address rollup cjs issues
1 parent b792fbb commit 82b8d91

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

example/polyfill-rollup.js

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/routes-rollup.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/post-build.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ const cwd = resolve(dirname(pathname), "..")
3737
});
3838
await bundle.write({
3939
sourcemap: true,
40-
output: {
41-
file: "./esnext/tests/rollup.js",
42-
},
40+
file: "./esnext/tests/rollup.js",
4341
inlineDynamicImports: true,
44-
format: "cjs",
45-
interop: "auto",
42+
format: "es",
43+
interop: "esModule",
4644
globals: {
4745
"esnext/tests/navigation.playwright.js": "globalThis"
4846
}
@@ -100,9 +98,7 @@ const cwd = resolve(dirname(pathname), "..")
10098
});
10199
await bundle.write({
102100
sourcemap: true,
103-
output: {
104-
file: "./esnext/routes-rollup.js",
105-
},
101+
file: "./esnext/routes-rollup.js",
106102
inlineDynamicImports: true,
107103
format: "esm",
108104
interop: "auto",
@@ -137,15 +133,14 @@ const cwd = resolve(dirname(pathname), "..")
137133
});
138134
await bundle.write({
139135
sourcemap: true,
140-
output: {
141-
file: "./esnext/polyfill-rollup.js",
142-
},
136+
file: "./esnext/polyfill-rollup.js",
143137
inlineDynamicImports: true,
144138
format: "cjs",
145-
interop: "auto",
139+
interop: "esModule",
146140
globals: {
147141

148-
}
142+
},
143+
exports: "auto"
149144
});
150145
}
151146

0 commit comments

Comments
 (0)