Skip to content

Commit 5325b20

Browse files
committed
build: fix chunks
1 parent ea0e033 commit 5325b20

3 files changed

Lines changed: 67 additions & 61 deletions

File tree

build.config.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ export default defineBuildConfig({
3030
entries: [
3131
{
3232
type: "bundle",
33-
input: ["src/builder.ts", "src/cli/index.ts", "src/types/index.ts"],
34-
},
35-
{
36-
type: "bundle",
37-
input: ["src/vite.ts"],
33+
input: [
34+
"src/builder.ts",
35+
"src/cli/index.ts",
36+
"src/types/index.ts",
37+
"src/vite.ts",
38+
],
3839
},
3940
{
4041
type: "transform",
@@ -82,6 +83,11 @@ export default defineBuildConfig({
8283
);
8384
},
8485
rolldownOutput(config) {
86+
config.advancedChunks!.includeDependenciesRecursively = false;
87+
config.advancedChunks!.groups?.unshift(
88+
{ test: /src\/build\/rollup/, name: "_build/rollup" },
89+
{ test: /src\/build\/rolldown/, name: "_build/rolldown" }
90+
);
8591
config.chunkFileNames = (chunk) => {
8692
if (chunk.name.startsWith("_")) {
8793
return `[name].mjs`;

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)