File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -140,8 +140,6 @@ export function renderAssetUrlInJS(
140
140
export function assetPlugin ( config : ResolvedConfig ) : Plugin {
141
141
registerCustomMime ( )
142
142
143
- const assetModuleId = new Set < string > ( )
144
-
145
143
return {
146
144
name : 'vite:asset' ,
147
145
@@ -199,10 +197,6 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
199
197
}
200
198
}
201
199
202
- // Note: rolldown does not support meta, use a Set instead of it for now
203
- if ( config . command === 'build' ) {
204
- assetModuleId . add ( id )
205
- }
206
200
return {
207
201
code : `export default ${ JSON . stringify ( encodeURIPath ( url ) ) } ` ,
208
202
// Force rollup to keep this module from being shared between other entry points if it's an entrypoint.
@@ -240,8 +234,7 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
240
234
chunk . isEntry &&
241
235
chunk . moduleIds . length === 1 &&
242
236
config . assetsInclude ( chunk . moduleIds [ 0 ] ) &&
243
- assetModuleId . has ( chunk . moduleIds [ 0 ] )
244
- // this.getModuleInfo(chunk.moduleIds[0])?.meta['vite:asset']
237
+ this . getModuleInfo ( chunk . moduleIds [ 0 ] ) ?. meta [ 'vite:asset' ]
245
238
) {
246
239
delete bundle [ file ]
247
240
}
Original file line number Diff line number Diff line change @@ -354,7 +354,6 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
354
354
} )
355
355
356
356
// NOTE: resolved.meta is undefined in dev
357
- // TODO: resolved.meta is not supported
358
357
if ( ! resolved || resolved . meta ?. [ 'vite:alias' ] ?. noResolved ) {
359
358
// in ssr, we should let node handle the missing modules
360
359
if ( ssr ) {
You can’t perform that action at this time.
0 commit comments