Skip to content

Commit a5cfe12

Browse files
committed
wip: update
1 parent fb79ab1 commit a5cfe12

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

packages/vite/src/node/server/environments/fullBundleEnvironment.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ export class FullBundleDevEnvironment extends DevEnvironment {
180180
// TODO: need to check if this is enough
181181
this.handleHmrOutput([m.path], update, {
182182
firstInvalidatedBy: m.firstInvalidatedBy,
183-
reason: m.message,
184183
})
185184
})()
186185
}
@@ -243,6 +242,10 @@ export class FullBundleDevEnvironment extends DevEnvironment {
243242
output.assetFileNames = 'assets/[name]-[hash][extname]'
244243
output.minify = false
245244
output.sourcemap = true
245+
// output.advancedChunks ||= {}
246+
// output.advancedChunks.groups = [
247+
// { name: 'chunk', maxSize: 1024 * 1024 },
248+
// ]
246249
}
247250
} else {
248251
rolldownOptions.output ??= {}
@@ -251,27 +254,30 @@ export class FullBundleDevEnvironment extends DevEnvironment {
251254
rolldownOptions.output.assetFileNames = 'assets/[name]-[hash][extname]'
252255
rolldownOptions.output.minify = false
253256
rolldownOptions.output.sourcemap = true
257+
// rolldownOptions.output.advancedChunks ||= {}
258+
// rolldownOptions.output.advancedChunks.groups = [
259+
// { name: 'chunk', maxSize: 1024 * 1024 },
260+
// ]
254261
}
262+
// rolldownOptions.experimental.strictExecutionOrder = true
255263

256264
return rolldownOptions
257265
}
258266

259267
private handleHmrOutput(
260268
files: string[],
261269
hmrOutput: HmrOutput,
262-
invalidateInformation?: { firstInvalidatedBy: string; reason?: string },
270+
invalidateInformation?: { firstInvalidatedBy: string },
263271
) {
264272
if (hmrOutput.type === 'Noop') return
265273

266274
const shortFile = files
267275
.map((file) => getShortName(file, this.config.root))
268276
.join(', ')
269277
if (hmrOutput.type === 'FullReload') {
270-
const reason =
271-
(hmrOutput.reason ? colors.dim(` (${hmrOutput.reason})`) : '') +
272-
(invalidateInformation?.reason
273-
? colors.dim(` (${invalidateInformation.reason})`)
274-
: '')
278+
const reason = hmrOutput.reason
279+
? colors.dim(` (${hmrOutput.reason})`)
280+
: ''
275281
this.logger.info(
276282
colors.green(`trigger page reload `) + colors.dim(shortFile) + reason,
277283
{ clear: !invalidateInformation, timestamp: true },

0 commit comments

Comments
 (0)