Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The keyword 'let' is reserved #56

Open
wcldyx opened this issue Apr 19, 2021 · 2 comments
Open

The keyword 'let' is reserved #56

wcldyx opened this issue Apr 19, 2021 · 2 comments

Comments

@wcldyx
Copy link

wcldyx commented Apr 19, 2021

在 src/mian/index.ts 文件中添一个中文变量会导致编译出错: Error: The keyword 'let' is reserved (Note that you need plugins to import files that are not JavaScript)

let 中文 = 123;
console.log(中文);
@ci010
Copy link
Owner

ci010 commented May 7, 2021

啊,我一下不知道这个是esbuild的问题还是啥,我更倾向于是esbuild不支持?如果是这要可能也没啥好的办法处理这个情况……

@wcldyx
Copy link
Author

wcldyx commented May 8, 2021

啊,我一下不知道这个是esbuild的问题还是啥,我更倾向于是esbuild不支持?如果是这要可能也没啥好的办法处理这个情况……

这个问题,我解决,将esbuild 配置 charset: 'utf8' 就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants