Commit ebfaa7e 1 parent d428e7e commit ebfaa7e Copy full SHA for ebfaa7e
File tree 1 file changed +3
-1
lines changed
packages/vite/src/node/plugins
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
204
204
config . command === 'build' && this . getModuleInfo ( id ) ?. isEntry
205
205
? 'no-treeshake'
206
206
: false ,
207
+ meta : config . command === 'build' ? { 'vite:asset' : true } : undefined ,
207
208
}
208
209
} ,
209
210
@@ -230,7 +231,8 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
230
231
chunk . type === 'chunk' &&
231
232
chunk . isEntry &&
232
233
chunk . moduleIds . length === 1 &&
233
- config . assetsInclude ( chunk . moduleIds [ 0 ] )
234
+ config . assetsInclude ( chunk . moduleIds [ 0 ] ) &&
235
+ this . getModuleInfo ( chunk . moduleIds [ 0 ] ) ?. meta [ 'vite:asset' ]
234
236
) {
235
237
delete bundle [ file ]
236
238
}
You can’t perform that action at this time.
0 commit comments