-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utils.js crashes IE11 with 'Expected identifier, string or number' #20
Comments
I don't have an environment to test against an IE11 |
The problematic part of the transpiled/finished source code looks like this:
Reverting to https://github.com/mib200/vue-gtm solves the problem, the same code in the loadScript function in https://github.com/mib200/vue-gtm/blob/master/src/utils.ts looks simpler. |
But Lines 56 to 59 in 66b68c3
So it must be something with down transpiling 🤔 Yes... Line 3 in 66b68c3
I think you have a bundler on your side, like webpack or so. Otherwise I need to look into how to ship multiple targets, so folks without IE11 have smaller bundler size and folks with IE11 needs to get served the old es5 code |
Yes, I'm using Vue CLI and my package.json targets IE11:
Now I can set up vue.config.js like this as well:
|
Nice, so if this works, I can update |
Sure, for those using Vue CLI it seems good. Thanks for helping with this issue :) |
Note was added to the readme |
Info
When running a production (Vue) build which uses https://www.npmjs.com/package/@gtm-support/vue2-gtm, the bundle fails to load in IE11 (screenshot below) due to a problem in utils.js from gtm-support/core.
The text was updated successfully, but these errors were encountered: