Closed attract closed 3 years ago
I tried to update the version nuxt
to 2.4.3
(as in the example - https://github.com/rubystarashe/nuxt-vuex-localstorage-example), the error remained..
Check your nuxt.config.js. Perhaps that syntax error can occur if a module is loaded from the wrong position(such as before nuxt compile)
https://github.com/rubystarashe/nuxt-vuex-localstorage-example Is it not working? I tested this repo a little while ago, and it works.
I did not check your example, only compare package version with my package.json
Trying change position in package.json
, set the last, same result.
IE11, I guess it is some babel-kind error, no object spread in older browsers, but i can find object spread in vendors.app.js
Hi. I solved this issue. How it works
// Add that code to nuxt.config.js
build: {
// ...
transpile: [
/(.+)(nuxt-vuex-localstorage\/)(.+)(\.js)$/
],
// ...
}
This build option make to transpile specific library. And when you try to run any build script, incompatible codes will be changed.
Hi. I solved this issue. How it works
// Add that code to nuxt.config.js build: { // ... transpile: [ /(.+)(nuxt-vuex-localstorage\/)(.+)(\.js)$/ ], // ... }
This build option make to transpile specific library. And when you try to run any build script, incompatible codes will be changed.
It's wierd why
build: {
// ...
transpile: [
"nuxt-vuex-localstorage"
],
// ...
}
won't work.
As stated here, it can be a package name.
maybe it was problem specific version nuxt
Version: "nuxt": "^2.0.0" "nuxt-vuex-localstorage": "^1.2.6"
Error in line
let data = { ...store.state }
Can you help?
Thanks