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

Issue with Nuxt 3 usage when running in dev #28

Open
boostie opened this issue Aug 15, 2022 · 1 comment
Open

Issue with Nuxt 3 usage when running in dev #28

boostie opened this issue Aug 15, 2022 · 1 comment

Comments

@boostie
Copy link

boostie commented Aug 15, 2022

Hi guys,

I have the following issue when running the component in Nuxt3 via "nuxi run dev".

✘ [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)

    node_modules/@solana/web3.js/lib/index.browser.esm.js:4466:20:
      4466 │     const U64_MAX = 2n ** 64n - 1n;
           ╵                     ~~

✘ [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)

    node_modules/@solana/web3.js/lib/index.browser.esm.js:4466:26:
      4466 │     const U64_MAX = 2n ** 64n - 1n;
           ╵                           ~~~

✘ [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari13" + 2 overrides)

    node_modules/@solana/web3.js/lib/index.browser.esm.js:4466:32:
      4466 │     const U64_MAX = 2n ** 64n - 1n;

I have tried multiple vite targets, but nothing seems to help this behavior. Anyone had the same issue?

Thanks

@DjilanoS
Copy link

DjilanoS commented Aug 30, 2022

Hi @boostie,

You have to update your Vite config accordingly.
The build target needs to be set to 'esnext'.

both dev & build should now work.

// https://vitejs.dev/config/
export default defineConfig({
  build: {
    target: 'esnext'
  },
  optimizeDeps: {
    esbuildOptions: {
      target: 'esnext'
    }
  },
  plugins: [vue()],  
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  }
})

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