Edge, IE issue SCRIPT1028: Expected identifier, string or number.
See original GitHub issuewe are using babel preset env to compile, however the vue-mapbox issue of the spread operator is causing issues with edge and ie 11.
this file: /node_modules/vue-mapbox/src/lib/withEvents.js
export default {
methods: {
/**
* Emit Vue event with additional data
*
* @param {string} name EventName
* @param {Object} [data={}] Additional data
*/
$_emitEvent(name, data = {}) {
this.$emit(name, {
map: this.map,
component: this,
...data
});
},
/**
* Emit Vue event with Mapbox event as additional data
*
* @param {Object} event
*/
$_emitMapEvent(event, data = {}) {
this.$_emitEvent(event.type, { mapboxEvent: event, ...data });
}
}
};
compiled reference {map:this.map,component:this,…e} is where the first issue is.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Edge: SCRIPT1028: Expected identifier, string or number
It appears (surprisingly) that Edge doesn't support property rest yet, which is unfortunate but then it was officially added only in ES2018.
Read more >[Bug Report] Not work in Edge, error:'SCRIPT1028 ... - GitHub
Note: I'm trying to run it on Edge, not IE. It says: "SCRIPT1028: SCRIPT1028: Expected identifier, string or number", pointing to my main.js ......
Read more >SOLUTION: SCRIPT1028: Expected identifier, string or number
How to fix: SCRIPT1028: Expected identifier, string or number JavaScript error in earlier versions of Internet Explorer.
Read more >Error - Expected identifier, string - Material Design for Bootstrap
Topic: [Error: SCRIPT1028: SCRIPT1028: Expected identifier, string or number] on DropdownToggle in Edge. Ragash free asked 3 years ago ...
Read more >Blank page with Expected identifier, string or number on IE 11 ...
My Vue app works perfectly on every browser except IE and Edge, i get this error : Expected identifier, string or number chunk-vendors.js ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this issue was solved with
Assuming you have
@vue/cli-plugin-babel
installed and your settings defined inbabel.config.js
, all you need to do is addtranspileDependencies: ['vue-mapbox']
to your vue.config.js. You should practically never need to do manual configuration of webpack loaders in modern versions of Vue.