Skip to content

Commit

Permalink
fix: add hash to lib chunks and assets
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Mar 6, 2022
1 parent 4194cce commit 32249cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/build.ts
Expand Up @@ -471,10 +471,10 @@ async function doBuild(
? resolveLibFilename(libOptions, output.format || 'es', config.root)
: path.posix.join(options.assetsDir, `[name].[hash].js`),
chunkFileNames: libOptions
? `[name].js`
? `[name].[hash].js`
: path.posix.join(options.assetsDir, `[name].[hash].js`),
assetFileNames: libOptions
? `[name].[ext]`
? `[name].[hash].[ext]`
: path.posix.join(options.assetsDir, `[name].[hash].[ext]`),
// #764 add `Symbol.toStringTag` when build es module into cjs chunk
// #1048 add `Symbol.toStringTag` for module default export
Expand Down

0 comments on commit 32249cf

Please sign in to comment.