Skip to content

Commit

Permalink
fix(server): drop unnecessary hashing causing deploy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Aug 17, 2022
1 parent d7d15dd commit 8b3311f
Showing 1 changed file with 1 addition and 3 deletions.
@@ -1,4 +1,3 @@
import {createHash} from 'crypto'
import type {ChunkMetadata, Plugin} from 'vite'
import type {SanityMonorepo} from '../sanityMonorepo'
import {renderDocument} from '../renderDocument'
Expand Down Expand Up @@ -43,8 +42,7 @@ export function sanityBuildEntries(options: {
throw new Error(`Failed to find entry file in bundle (${entryFileName})`)
}

const entryHash = createHash('sha256').update(entryFile.code).digest('hex').slice(0, 8)
const entryPath = [basePath.replace(/\/+$/, ''), `${entryFileName}?v=${entryHash}`].join('/')
const entryPath = [basePath.replace(/\/+$/, ''), entryFileName].join('/')

let css: string[] = []
if (entryFile.viteMetadata?.importedCss) {
Expand Down

0 comments on commit 8b3311f

Please sign in to comment.