rubystarashe / nuxt-vuex-localstorage

MIT License
161 stars 18 forks source link

IE11 not opening website #7

Closed maziarz closed 5 years ago

maziarz commented 5 years ago

I recently noticed that ie11 is not opening my website.

SCRIPT1028: SCRIPT1028: Expected identifier, string or number

Unfortunately i had to debug this in browserstack and it refers to the line: let data = { ...store.state }

Is this a lack of polyfill for IE11?

Skærmbillede 2019-03-19 kl  00 00 39
rubystarashe commented 5 years ago

try use the transpile options in nuxt.config.js

maziarz commented 5 years ago

When i do that, this is what happens in Chrome

commons.app.js:11814 Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
    at Module.<anonymous> (commons.app.js:11814)
    at Module../node_modules/nuxt-vuex-localstorage/node_modules/axios/lib/utils.js (commons.app.js:11836)
    at __webpack_require__ (runtime.js:787)
    at fn (runtime.js:150)
    at Module.<anonymous> (commons.app.js:10321)
    at Module../node_modules/nuxt-vuex-localstorage/node_modules/axios/lib/axios.js (commons.app.js:10368)
    at __webpack_require__ (runtime.js:787)
    at fn (runtime.js:150)
    at Object../node_modules/nuxt-vuex-localstorage/node_modules/axios/index.js (commons.app.js:10104)
    at __webpack_require__ (runtime.js:787)
rubystarashe commented 5 years ago

캡처

Try nuxt-vuex-localstorage-example repo. it works well

maziarz commented 5 years ago

I double checked with your example. The only difference is that i am using nuxt 2.5.1. Otherwise it looks the same.

maziarz commented 5 years ago

Seems to be a node_modules problem, i cleared the folder and deleted the package-lock.json, now it seems to be working!

seanaye commented 5 years ago

I cleared package-lock.json and node_modules. I and getting Cannot assign to read only property 'exports' of object '#' in chrome

Nuxt 2.9.1

bpeab commented 5 years ago

Also having Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' when nuxt-vuex-localstorage is added to the transpile array. Not adding it, breaks IE 11 anyway.

seanaye commented 5 years ago

@bpeab try adding

build: {
    sourceType: ‘unambiguous’
    ...
}

It worked for me