Closed auedbaki closed 4 years ago
I am also getting this error when I include the ie transpile. build: { /* * You can extend webpack config here / transpile: [ 'nuxt-vuex-localstorage' ], extend(config, ctx) {
}
}
I need to have ie compatibility
I'm getting a TypeError: "exports" is read-only
error with this too. Nuxt version 2.9.2
when I had transpile: ["vuex"],
in my nuxt.config.js build
function.
I was struggling with the same issue when using the ie transpile. In my case, I was able to fix it by adding sourceType: 'unambiguous'
under babel property under build in nuxt.js.config. Like this:
build: {
babel: {
sourceType: 'unambiguous',
},
transpile: [
'nuxt-vuex-localstorage',
],
}
This could cause some other unforeseen issues and I don't really know what it does beyond what it says in Babel documentation: https://babeljs.io/docs/en/options#sourcetype. I'd like to know if there is a better way to fix this, but this seems to work for me.
thanks for sharing that fix @RowEchelonForm any advance about that ? I just started getting that problem recently. Currently using Nuxt 2.11
old version nuxt's issue This seems to be solved.
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#