File tree Expand file tree Collapse file tree
packages/vite/src/node/plugins Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,6 +340,8 @@ The following options are deprecated and will be removed in the future:
340340
341341## Removed Deprecated Features [ <Badge text =" NRV " type =" warning " />] ( #migration-from-v7 )
342342
343+ - Passing an URL to ` import.meta.hot.accept ` is no longer supported. Please pass an id instead. ([ #21382 ] ( https://github.com/vitejs/vite/pull/21382 ) )
344+
343345** _ TODO: This change is not implemented yet, but will be implemented before stable release._ **
344346
345347## Advanced
Original file line number Diff line number Diff line change @@ -318,8 +318,6 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
318318 const importedBindings = enablePartialAccept
319319 ? new Map < string , Set < string > > ( )
320320 : null
321- const toAbsoluteUrl = ( url : string ) =>
322- path . posix . resolve ( path . posix . dirname ( importerModule . url ) , url )
323321
324322 const normalizeUrl = async (
325323 url : string ,
@@ -788,22 +786,10 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
788786 }
789787 normalized = mod . url
790788 } else {
791- try {
792- // this fallback is for backward compat and will be removed in Vite 7
793- const [ resolved ] = await moduleGraph . resolveUrl ( toAbsoluteUrl ( url ) )
794- normalized = resolved
795- if ( resolved ) {
796- this . warn ( {
797- message :
798- `Failed to resolve ${ JSON . stringify ( url ) } from ${ importer } .` +
799- ' An id should be written. Did you pass a URL?' ,
800- pos : start ,
801- } )
802- }
803- } catch {
804- this . error ( `Failed to resolve ${ JSON . stringify ( url ) } ` , start )
805- return
806- }
789+ this . error ( {
790+ message : `Failed to resolve ${ JSON . stringify ( url ) } from ${ importer } .` ,
791+ pos : start ,
792+ } )
807793 }
808794 normalizedAcceptedUrls . add ( normalized )
809795 const hmrAccept = normalizeHmrUrl ( normalized )
You can’t perform that action at this time.
0 commit comments