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

Release brokes build on IE 11 #1137

Closed
fcorallini opened this issue Apr 7, 2021 · 4 comments · Fixed by #1138
Closed

Release brokes build on IE 11 #1137

fcorallini opened this issue Apr 7, 2021 · 4 comments · Fixed by #1138
Labels

Comments

@fcorallini
Copy link

fcorallini commented Apr 7, 2021

What is actually happening?

nuxt-i18n adds the is-https dependency, which code is not transpiled properly,
similar error dissussed here #329

The build works fine on IE11 with version v5.12.7

Version

"nuxt": "^2.15.2",
"nuxt-i18n": "^6.22.3",

Nuxt configuration

import webpack from 'webpack'

export default {
  /*
   ** Nuxt.js modules
   */
  modules: [
    '@nuxtjs/axios',
    '@nuxtjs/auth',
    '@nuxtjs/font-awesome',
    'bootstrap-vue/nuxt',
    'cookie-universal-nuxt',
    'nuxt-modernizr',
    'nuxt-i18n',
  ],
  /*
   ** Customize the build directory
   */
  generate: {
    dir: 'dist/beta',
  },
  i18n: {
    locales: [
      {
        code: 'en',
        file: 'en.json',
        header: 'en-US',
      },
      {
        code: 'it',
        file: 'it.json',
        header: 'it-IT',
      },
    ],
    defaultLocale: 'it',
    strategy: 'prefix',
    langDir: 'lang/',
    lazy: true,
    vueI18n: {
      silentTranslationWarn: true,
      silentFallbackWarn: false,
      detectBrowserLanguage: false,
    },
  },
  /*
   ** Build configuration
   */
  build: {
    /*
     ** You can extend webpack config here
     */
    extend(config, ctx) {},
    plugins: [
      new webpack.ProvidePlugin({
        // global modules
      }),
    ],
  },
  //  etc ...
}

@rchl
Copy link
Collaborator

rchl commented Apr 7, 2021

@pi0 @danielroe Should is-https be compiled to a lower target?
I've tried with ES3/ES2015 targets and that still had default argument though...

@rchl
Copy link
Collaborator

rchl commented Apr 7, 2021

For the moment I'll just inline that function as it's pretty small.

@danielroe
Copy link
Contributor

@rchl esbuild/siroc can't currently build for IE11 (follow danielroe/siroc#197) so IE11 supporters should probably add is-https to build.transpile.

@rchl
Copy link
Collaborator

rchl commented Apr 7, 2021

Thanks. I could add to transpile list from the module but for now, will just go with inlining since it's not likely to need updates.

Fixed in https://github.com/nuxt-community/i18n-module/releases/tag/v6.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants