ibufu / vue2-scrollspy

Scrollspy for Vue2
https://ibufu.github.io/vue2-scrollspy/
MIT License
135 stars 32 forks source link

SCRIPT1002: Syntax error on IE 11 #27

Closed orckid-lab closed 5 years ago

orckid-lab commented 6 years ago

Importing vue2-scrollspy generates an error on IE11. Using laravel-mix to compile.

Error points at eval("/* unused harmony export install */\n/* harmony import */ var

Anyone experienced this?

shnparker commented 6 years ago

Getting the same error on IE11 using Element UI & Vue CLI 3.

Removing the following lines fixes the application, indicating that it is originating from this plugin.

import Scrollspy from "vue2-scrollspy";
Vue.use(Scrollspy);

I found the error by looking at the bundled code and seeing that IE11 doesn't understand the => in the bundle. I could be wrong about the source of the issue, but it definitely is this plugin's import.

shnparker commented 6 years ago

Any update on this issue?

ibufu commented 6 years ago

fixed

rdpascua commented 6 years ago

capture

@ibufu doesn't seem to fix on my end. I'm using IE11

awakash commented 6 years ago

Here's the error in IE11: dashboard

Alludes to what @ShaneParker mentioned above: dashboard-2

Any thoughts?

Anima-t3d commented 5 years ago

Issue still persists

Anima-t3d commented 5 years ago

I think the issue is caused by having package.json put module as src: https://github.com/ibufu/vue2-scrollspy/blob/master/package.json#L5-L6

  "main": "dist/index.js",
  "module": "src/index.js",

If I change the following it works:

import Scrollspy from "vue2-scrollspy";
Vue.use(Scrollspy);

TO:

import Scrollspy from "vue2-scrollspy/dist/index";
Vue.use(Scrollspy);