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

🧐[问题]打包失败Big integer literals are not available in the configured target environment #9712

Closed
itxiaoe opened this issue Mar 28, 2022 · 2 comments

Comments

@itxiaoe
Copy link

itxiaoe commented Mar 28, 2022

🧐 问题描述

libs/potree-1.8/potree/potree.js:66398:39: error: Big integer literals are not available in the configured target environment
文件地址
path: public/libs/potree/potree.js
文件大小
potree.js:2.3MB
potree.js.map:5.2MB

💻 示例代码

🚑 其他信息

@chenshuai2144
Copy link
Collaborator

这个库应该不支持低版本的浏览器,你把target设置的高一点。

sveltejs/kit#859

至少要到 2020.

https://umijs.org/config#targets

@itxiaoe
Copy link
Author

itxiaoe commented Mar 28, 2022

问题解决了,根本原因是config.js配置项esbuild,开启之后会transform代码(Default: 'es2015'),包括public下的内容,而es2015不支持bigint

// config.js
export default defineConfig({
   esbuild: {}, // https://umijs.org/plugins/plugin-esbuild
})

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