File tree 1 file changed +1
-11
lines changed
packages/vite/src/node/plugins
1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -132,10 +132,6 @@ export function renderAssetUrlInJS(
132
132
return s
133
133
}
134
134
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
-
139
135
/**
140
136
* Also supports loading plain strings with import text from './foo.txt?raw'
141
137
*/
@@ -164,17 +160,11 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
164
160
// will fail to resolve in the main resolver. handle them here.
165
161
const publicFile = checkPublicFile ( id , config )
166
162
if ( publicFile ) {
167
- return config . command === 'build'
168
- ? `${ viteBuildPublicIdPrefix } ${ id } `
169
- : id
163
+ return id
170
164
}
171
165
} ,
172
166
173
167
async load ( id ) {
174
- if ( id . startsWith ( viteBuildPublicIdPrefix ) ) {
175
- id = id . slice ( viteBuildPublicIdPrefix . length )
176
- }
177
-
178
168
if ( id [ 0 ] === '\0' ) {
179
169
// Rollup convention, this id should be handled by the
180
170
// plugin that marked it with \0
You can’t perform that action at this time.
0 commit comments