-
Notifications
You must be signed in to change notification settings - Fork 27
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 (vite3 + vMoney3 + vue3) #70
Comments
Maybe change this line to Line 10 in a198163
|
Any update about this issue? |
You are using "safari13", bigint is only available in safari14 and above. Take a look here: https://caniuse.com/bigint |
If anyone is facing this issue, the solution is in the PR #71 |
Why does "es2020" not work for you? It should work fine with bigint. |
Well, I don't have "safari13" anywhere in my code but I get the same error as the OP. Btw, if anyone is following my route, it will work on vite dev but not on vite build: pages with v-money3 component will not show it and the console will report a setupcontext null error. Just delete node_modules folder from local and vite will work on production too. |
@lanz1 can u share ur vite config? changing vite build.target to es2021 seems to affect absolute nothing |
It isn't affected because BigInt was introduced in 'es2020', it should work fine with 'es2021'. You have probably another misconfiguration. Can you share your configuration? |
This is vite.config.ts generated from
Here is the reproduction |
Yes @diego-lipinski-de-castro , it does nothing. I don't know why, but es2021 has to be changed into v-money3. In your package.json add:
When you use it in a component:
Then you use normally as Sorry @jonathanpmartins for my pretty useless fork, but I could not make it work from your and i needed a quick fix. |
Hey @lanz1, good News, i found out how to make it work |
@diego-lipinski-de-castro , it builds in production, but still does not work during development:
|
Weird, for me it works, but I'm not using the component tho, just the directive |
Just found this issue: vitejs/vite#9062. Es2020 is not fully supported in Vite 3 yet. This is why you guys are getting errors where it shouldn't be any. Please, put the following code inside your
@christhofer I changed the @lanz1 If you rollback to @diego-lipinski-de-castro You didn't make any misconfiguration, at the end it was a Vite problem. Complete example: import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
optimizeDeps: {
esbuildOptions: {
target: ['es2020', 'safari14'],
},
},
build: {
target: ['es2020', 'safari14'],
},
}); |
@jonathanpmartins yes, my build target has always been BUT... adding your snippet:
fixed the problem completely during dev stage. |
The snippet is temporary, until Vite 3 has full ES2020 support. |
hello, i have a problem using viteJS + vue 3 with v-money3.
At instance time, an error is generated that prevents me from running the server or build.
This is the error that accuses, can you help me?
`Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)
✘ [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)
✘ [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)
The text was updated successfully, but these errors were encountered: