SolidJSS
SolidJSโ€ข16mo agoโ€ข
4 replies
SilentRhetoric

Vinxi server build fails: Big integer literals not available in target environment ("es2019")

I am getting an error when building locally as well as when Netlify tries to build:

.../.vinxi/build/ssr/index.js:1:40327: ERROR: Big integer literals are not available in the configured target environment ("es2019")

I have looked through the Solid Start, Vinxi and Nitro docs to try to figure out where I can configure this to use a more modern target environment.

My app.config.ts currently looks like this:

export default defineConfig({
  ssr: true,
  server: {
    prerender: {
      routes: ["/", "/about", "/manage"],
    },
  },
  vite: {
    optimizeDeps: {
      include: [
        "@perawallet/connect",
        "@blockshake/defly-connect",
        "@walletconnect/modal",
        "@walletconnect/sign-client",
        "algosdk",
      ],
      esbuildOptions: {
        target: "es2020",
        // Node.js global to browser globalThis
        define: {
          global: "globalThis",
        },
        supported: {
          bigint: true,
        },
      },
    },
    build: {
      target: ["es2020"],
      commonjsOptions: {
        transformMixedEsModules: true,
      },
    },
    esbuild: { drop: ["console"] },
  },
})


And tsconfig.json:
{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ES2020",
    "lib": ["es2020", "esnext"],
    "moduleResolution": "bundler",
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "jsx": "preserve",
    "jsxImportSource": "solid-js",
    "allowJs": true,
    "noEmit": true,
    "strict": true,
    "types": ["vinxi/types/client"],
    "isolatedModules": true,
    "paths": {
      "~/*": ["./src/*"]
    }
  }
}


Nothing in either config file seems to have any impact on this "configured target environment" so any help on how I can reconfigure this would be much appreciated!
Was this page helpful?