Skip to content

Commit

Permalink
fix: add charset to esbuild build options
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed Nov 2, 2022
1 parent c53ffec commit 5b839c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/node/__tests__/plugins/esbuild.spec.ts
Expand Up @@ -17,6 +17,7 @@ describe('resolveEsbuildTranspileOptions', () => {
'es'
)
expect(options).toEqual({
charset: 'utf8',
target: 'es2020',
format: 'esm',
keepNames: true,
Expand Down Expand Up @@ -150,6 +151,7 @@ describe('resolveEsbuildTranspileOptions', () => {
'cjs'
)
expect(options).toEqual({
charset: 'utf8',
target: undefined,
format: 'cjs',
keepNames: true,
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/node/plugins/esbuild.ts
Expand Up @@ -375,6 +375,7 @@ export function resolveEsbuildTranspileOptions(
return {
...options,
minify: true,
charset: 'utf8',
treeShaking: true
}
}
Expand Down

0 comments on commit 5b839c8

Please sign in to comment.