feat!: set esbuild default charset to utf8#10753
Conversation
| return { | ||
| ...options, | ||
| minify: true, | ||
| charset: 'utf8', |
There was a problem hiding this comment.
I think charset should be moved up to the definition of options so we have consistent usage of utf8 by default. We also need to define it before the esbuildOptions spread so the user can overwrite it.
9e67fe5 to
b6878cf
Compare
|
Is this only for v4 ? Because I get the exact same error in version |
|
Yes, this is only for v4. |
I tried to upgrade to v4 but i encountered many other problems because of other packages that do not support v4. Are you planing on fixing this for v3 too? This problem happened to me today suddenly. |
|
@samyarkd I suggest you still try to upgrade to v4, but if you need to stay in v3, you should be able to set |

Currently, if I use a language other than English in my javascript code, my bundle gets very large. To avoid this, I have to use a Terser. For example, Terser preserves "丂", but esbuild seems to convert it to "\u4E02".
In order to solve the problem and start using esbuild without fear, we need to add charset.