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 @@ -138,8 +138,6 @@ export function renderAssetUrlInJS(
138
138
export function assetPlugin ( config : ResolvedConfig ) : Plugin {
139
139
registerCustomMime ( )
140
140
141
- const assetModuleId = new Set < string > ( )
142
-
143
141
return {
144
142
name : 'vite:asset' ,
145
143
@@ -197,10 +195,6 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
197
195
}
198
196
}
199
197
200
- // Note: rolldown does not support meta, use a Set instead of it for now
201
- if ( config . command === 'build' ) {
202
- assetModuleId . add ( id )
203
- }
204
198
return {
205
199
code : `export default ${ JSON . stringify ( encodeURIPath ( url ) ) } ` ,
206
200
// Force rollup to keep this module from being shared between other entry points if it's an entrypoint.
@@ -238,8 +232,7 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
238
232
chunk . isEntry &&
239
233
chunk . moduleIds . length === 1 &&
240
234
config . assetsInclude ( chunk . moduleIds [ 0 ] ) &&
241
- assetModuleId . has ( chunk . moduleIds [ 0 ] )
242
- // this.getModuleInfo(chunk.moduleIds[0])?.meta['vite:asset']
235
+ this . getModuleInfo ( chunk . moduleIds [ 0 ] ) ?. meta [ 'vite:asset' ]
243
236
) {
244
237
delete bundle [ file ]
245
238
}
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