We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vitejs
Learn more about funding links in repositories.
Report abuse
browserHash
1 parent c89f677 commit 0fb2340Copy full SHA for 0fb2340
packages/vite/src/node/plugins/resolve.ts
@@ -250,7 +250,10 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin {
250
if (depsOptimizer?.isOptimizedDepFile(normalizedFsPath)) {
251
// Optimized files could not yet exist in disk, resolve to the full path
252
// Inject the current browserHash version if the path doesn't have one
253
- if (!normalizedFsPath.match(DEP_VERSION_RE)) {
+ if (
254
+ !resolveOptions.isBuild &&
255
+ !normalizedFsPath.match(DEP_VERSION_RE)
256
+ ) {
257
const browserHash = optimizedDepInfoFromFile(
258
depsOptimizer.metadata,
259
normalizedFsPath,
0 commit comments