Skip to content

Commit

Permalink
feat: set default charser for dev and optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed Nov 9, 2022
1 parent b6878cf commit 01cf593
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/vite/src/node/optimizer/index.ts
Expand Up @@ -612,6 +612,7 @@ export async function runOptimizeDeps(
ignoreAnnotations: !isBuild,
metafile: true,
plugins,
charset: 'utf8',
...esbuildOptions,
supported: {
'dynamic-import': true,
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/node/plugins/esbuild.ts
Expand Up @@ -180,6 +180,7 @@ export function esbuildPlugin(options: ESBuildOptions = {}): Plugin {
// and for build as the final optimization is in `buildEsbuildPlugin`
const transformOptions: TransformOptions = {
target: 'esnext',
charset: 'utf8',
...options,
minify: false,
minifyIdentifiers: false,
Expand Down

0 comments on commit 01cf593

Please sign in to comment.