File tree 3 files changed +11
-0
lines changed
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ describe('resolveEsbuildTranspileOptions', () => {
17
17
'es'
18
18
)
19
19
expect ( options ) . toEqual ( {
20
+ charset : 'utf8' ,
20
21
target : 'es2020' ,
21
22
format : 'esm' ,
22
23
keepNames : true ,
@@ -59,6 +60,7 @@ describe('resolveEsbuildTranspileOptions', () => {
59
60
'es'
60
61
)
61
62
expect ( options ) . toEqual ( {
63
+ charset : 'utf8' ,
62
64
target : undefined ,
63
65
format : 'esm' ,
64
66
keepNames : true ,
@@ -88,6 +90,7 @@ describe('resolveEsbuildTranspileOptions', () => {
88
90
'es'
89
91
)
90
92
expect ( options ) . toEqual ( {
93
+ charset : 'utf8' ,
91
94
target : 'es2020' ,
92
95
format : 'esm' ,
93
96
keepNames : true ,
@@ -119,6 +122,7 @@ describe('resolveEsbuildTranspileOptions', () => {
119
122
'es'
120
123
)
121
124
expect ( options ) . toEqual ( {
125
+ charset : 'utf8' ,
122
126
target : undefined ,
123
127
format : 'esm' ,
124
128
keepNames : true ,
@@ -150,6 +154,7 @@ describe('resolveEsbuildTranspileOptions', () => {
150
154
'cjs'
151
155
)
152
156
expect ( options ) . toEqual ( {
157
+ charset : 'utf8' ,
153
158
target : undefined ,
154
159
format : 'cjs' ,
155
160
keepNames : true ,
@@ -180,6 +185,7 @@ describe('resolveEsbuildTranspileOptions', () => {
180
185
'es'
181
186
)
182
187
expect ( options ) . toEqual ( {
188
+ charset : 'utf8' ,
183
189
target : undefined ,
184
190
format : 'esm' ,
185
191
keepNames : true ,
@@ -214,6 +220,7 @@ describe('resolveEsbuildTranspileOptions', () => {
214
220
'cjs'
215
221
)
216
222
expect ( options ) . toEqual ( {
223
+ charset : 'utf8' ,
217
224
target : undefined ,
218
225
format : 'cjs' ,
219
226
keepNames : true ,
Original file line number Diff line number Diff line change @@ -612,6 +612,7 @@ export async function runOptimizeDeps(
612
612
ignoreAnnotations : ! isBuild ,
613
613
metafile : true ,
614
614
plugins,
615
+ charset : 'utf8' ,
615
616
...esbuildOptions ,
616
617
supported : {
617
618
'dynamic-import' : true ,
Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ export function esbuildPlugin(options: ESBuildOptions = {}): Plugin {
180
180
// and for build as the final optimization is in `buildEsbuildPlugin`
181
181
const transformOptions : TransformOptions = {
182
182
target : 'esnext' ,
183
+ charset : 'utf8' ,
183
184
...options ,
184
185
minify : false ,
185
186
minifyIdentifiers : false ,
@@ -306,7 +307,9 @@ export function resolveEsbuildTranspileOptions(
306
307
// https://github.com/vuejs/core/issues/2860#issuecomment-926882793
307
308
const isEsLibBuild = config . build . lib && format === 'es'
308
309
const esbuildOptions = config . esbuild || { }
310
+
309
311
const options : TransformOptions = {
312
+ charset : 'utf8' ,
310
313
...esbuildOptions ,
311
314
target : target || undefined ,
312
315
format : rollupToEsbuildFormatMap [ format ] ,
You can’t perform that action at this time.
0 commit comments