File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -132,10 +132,6 @@ export function renderAssetUrlInJS(
132132 return s
133133}
134134
135- // During build, if we don't use a virtual file for public assets, rollup will
136- // watch for these ids resulting in watching the root of the file system in Windows,
137- const viteBuildPublicIdPrefix = '\0vite:asset:public'
138-
139135/**
140136 * Also supports loading plain strings with import text from './foo.txt?raw'
141137 */
@@ -164,17 +160,11 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
164160 // will fail to resolve in the main resolver. handle them here.
165161 const publicFile = checkPublicFile ( id , config )
166162 if ( publicFile ) {
167- return config . command === 'build'
168- ? `${ viteBuildPublicIdPrefix } ${ id } `
169- : id
163+ return id
170164 }
171165 } ,
172166
173167 async load ( id ) {
174- if ( id . startsWith ( viteBuildPublicIdPrefix ) ) {
175- id = id . slice ( viteBuildPublicIdPrefix . length )
176- }
177-
178168 if ( id [ 0 ] === '\0' ) {
179169 // Rollup convention, this id should be handled by the
180170 // plugin that marked it with \0
You can’t perform that action at this time.
0 commit comments