egoist / svg-to-vue-component

Transform SVG files into Vue SFC (with hot reloading and SVGO support)
MIT License
235 stars 18 forks source link

Syntax errors on Internet Explorer 11 (and older) #20

Closed antoinerey closed 5 years ago

antoinerey commented 5 years ago

Description

Using SVG files including style tags causes syntax errors on IE 11 (and older)

Possible solution

It seems that the lib/StyleComponent.js file is written using recent syntax (object method shorthand), and is not transpiled properly before being used. I believe that either updating the lib/StyleComponent.js file, or transpiling it should fix the issue.

Steps to reproduce

Clone the reproduction respository, and follow the steps below using IE 11.

  1. Open http://localhost:3000/working, and play with the counter button. Each click does increment the counter.
  2. Open http://localhost:3000/buggy, and play with the counter. Nothing happens.
  3. Open the browser console. There is a syntax error linked to the lib/StyleComponent.js file.
egoist commented 5 years ago

:tada: This issue has been resolved in version 0.3.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: