0

The page is loading correctly on every browser except IE 11 and Microsoft Edge. The only error that i can see is "SCRIPT1028: SCRIPT1028: Expected identifier, string or number chunk-vendors.8615b873.js (1407,41419)". The code:

this.form.addEventListener("submit",async e=>{
try{
this.$emit("loading",!0),e.preventDefault();
const{
,error:n
}=await this.$stripe.createToken({...this.card,amount:1e3});
Florin Relea
  • 513
  • 6
  • 15
  • For IE 11 you should use babel and configure it to transform async/await, '...' operator and arrow function as a minimum. You can check if something is working in IE11 on caniuse.com – Anatoly Mar 15 '20 at 19:03

1 Answers1

0

Does the error point to the line using { ...obj } object rest/spread properties? The syntax is a part of ECMAScript 2018 which is not supported by Edge Legacy and IE. You could also refer to this thread and this thread which have similar issues.

You need to use Babel to transpile it. Install @babel/plugin-proposal-object-rest-spread by running:

npm install --save-dev @babel/plugin-proposal-object-rest-spread

Then include it as plugin according to the usage.

Yu Zhou
  • 11,532
  • 1
  • 8
  • 22