Skip to content

Commit

Permalink
fix: respect .mjs .cjs extension in all modes (#9141)
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat authored Jul 15, 2022
1 parent 5a8a3ab commit 5ea70b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,10 @@ async function doBuild(
? `[name].${jsExt}`
: libOptions
? resolveLibFilename(libOptions, format, config.root, jsExt)
: path.posix.join(options.assetsDir, `[name].[hash].js`),
: path.posix.join(options.assetsDir, `[name].[hash].${jsExt}`),
chunkFileNames: libOptions
? `[name].[hash].${jsExt}`
: path.posix.join(options.assetsDir, `[name].[hash].js`),
: path.posix.join(options.assetsDir, `[name].[hash].${jsExt}`),
assetFileNames: libOptions
? `[name].[ext]`
: path.posix.join(options.assetsDir, `[name].[hash].[ext]`),
Expand Down

0 comments on commit 5ea70b3

Please sign in to comment.