[Vuejs]-Unctx:transfrom Unexpected token (65:4) file: /node_modules/nuxt/dist/pages/runtime/router.mjs:65:4 NUXT 3.0

1๐Ÿ‘

I found the solution.
I am using AWS sdk with nuxt 3 which is causing issues.
In Nuxt.config file instead of

vite: {
    resolve: {
      alias: {
        './runtimeConfig': './runtimeConfig.browser'
      }
    },
    // temp-fix for dev, it breaks build for now (see: https://github.com/nuxt/framework/issues/4916)
    define: {
      global: {}
    }
  },

Using this would help. Github Issue

vite: {
    resolve: {
      alias: {
        './runtimeConfig': './runtimeConfig.browser'
      }
    },
    // temp-fix for dev, it breaks build for now (see: https://github.com/nuxt/framework/issues/4916)
    define: {
      'window.global': {}
    }
  },
๐Ÿ‘คMuhammad Afzaal

Leave a comment