Skip to content

Commit 8601e15

Browse files
authored
fix(build): explicitly specify asset and entry file names (#1607)
1 parent cc91d55 commit 8601e15

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/node/build/bundle.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,19 @@ export async function bundle(
7171
output: {
7272
sanitizeFileName,
7373
...rollupOptions?.output,
74+
assetFileNames: 'assets/[name].[hash].[ext]',
7475
...(ssr
7576
? {
76-
entryFileNames: `[name].js`,
77-
chunkFileNames: `[name].[hash].js`
77+
entryFileNames: '[name].js',
78+
chunkFileNames: '[name].[hash].js'
7879
}
7980
: {
81+
entryFileNames: 'assets/[name].[hash].js',
8082
chunkFileNames(chunk) {
8183
// avoid ads chunk being intercepted by adblock
8284
return /(?:Carbon|BuySell)Ads/.test(chunk.name)
83-
? `assets/chunks/ui-custom.[hash].js`
84-
: `assets/chunks/[name].[hash].js`
85+
? 'assets/chunks/ui-custom.[hash].js'
86+
: 'assets/chunks/[name].[hash].js'
8587
},
8688
manualChunks(id, ctx) {
8789
// move known framework code into a stable chunk so that

0 commit comments

Comments
 (0)