File tree 1 file changed +1
-1
lines changed
packages/vite/src/node/plugins
1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
183
183
? // If `experimental.renderBuiltUrl` or `build.modulePreload.resolveDependencies` are used
184
184
// the dependencies are already resolved. To avoid the need for `new URL(dep, import.meta.url)`
185
185
// a helper `__vitePreloadRelativeDep` is used to resolve from relative paths which can be minimized.
186
- `function(dep, importerUrl) { return dep.startsWith( '.') ? new URL(dep, importerUrl).href : dep }`
186
+ `function(dep, importerUrl) { return dep[0] === '.' ? new URL(dep, importerUrl).href : dep }`
187
187
: optimizeModulePreloadRelativePaths
188
188
? // If there isn't custom resolvers affecting the deps list, deps in the list are relative
189
189
// to the current chunk and are resolved to absolute URL by the __vitePreload helper itself.
You can’t perform that action at this time.
0 commit comments