[Vuejs]-Nuxt3 AWS-Amplify Error: 'request' is not exported by __vite-browser-external,

5πŸ‘

βœ…

I solved my issue by pasting the following code inside the vite object of the nuxt.config.ts.

vite: {
    define: {
      "process.env.DEBUG": false,
      "window.global": {},
    },
    resolve: {
      alias: {
        "./runtimeConfig": "./runtimeConfig.browser", //fix production build
      },
    },
  },
πŸ‘€Ali Raza

Leave a comment