Skip to content

Commit

Permalink
Update packages/vite/src/node/plugins/importAnalysisBuild.ts
Browse files Browse the repository at this point in the history
Co-authored-by: patak <matias.capeletto@gmail.com>
  • Loading branch information
btea and patak-dev authored Aug 1, 2023
1 parent 8eff2a3 commit 472f5da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/importAnalysisBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
? // If `experimental.renderBuiltUrl` or `build.modulePreload.resolveDependencies` are used
// the dependencies are already resolved. To avoid the need for `new URL(dep, import.meta.url)`
// a helper `__vitePreloadRelativeDep` is used to resolve from relative paths which can be minimized.
`function(dep, importerUrl) { return return dep[0] === '.' ? new URL(dep, importerUrl).href : dep }`
`function(dep, importerUrl) { return dep[0] === '.' ? new URL(dep, importerUrl).href : dep }`
: optimizeModulePreloadRelativePaths
? // If there isn't custom resolvers affecting the deps list, deps in the list are relative
// to the current chunk and are resolved to absolute URL by the __vitePreload helper itself.
Expand Down

0 comments on commit 472f5da

Please sign in to comment.