Skip to content
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

IE11 SCRIPT1003: ':' expected #14382

Closed
HerrVoennchen opened this issue Dec 11, 2018 · 6 comments
Closed

IE11 SCRIPT1003: ':' expected #14382

HerrVoennchen opened this issue Dec 11, 2018 · 6 comments
Assignees
Milestone

Comments

@HerrVoennchen
Copy link

Hi,

i'm not quite sure I'm in the right place for this issue but I like to explain it and maybe at least I get a better understanden where to address this.

I'm using FA5

        "@fortawesome/fontawesome-svg-core": "^1.2.9",
        "@fortawesome/free-brands-svg-icons": "^5.6.0",
        "@fortawesome/free-regular-svg-icons": "^5.6.0",
        "@fortawesome/free-solid-svg-icons": "^5.6.0",
        "@fortawesome/react-fontawesome": "^0.1.3",

with react 16/babel 7/Webpack 4

and babel is set up to boil it down to IE11. Now it seems like IE11 has a problem with the following code which is located in all 3 (brands, regular and solid) packages of FA5 (index.js):

error: SCRIPT1003: ':' expected

line points to:

var _iconsCache = {
    fa500px,
    faAccessibleIcon,
    faAccusoft,
    faAcquisitionsIncorporated,
    faAdn,
...

which is correct, it's ES6 syntax and IE11 does not support it.

I consume FA as follows:

import { fab } from '@fortawesome/free-brands-svg-icons/index';
import { fas } from '@fortawesome/free-solid-svg-icons/index';
import { far } from '@fortawesome/free-regular-svg-icons/index';

import { library } from '@fortawesome/fontawesome-svg-core';

library.add(fab, fas, far);

so now my point is, should babel transform this or is this an issue on FA side since IE11 is official supported and at least the JS files are not.

I tried to include the node_modules to babel in the process (was excluded before) but it had no effect.

{
  test: /\.jsx?$/,
  loader: 'babel-loader',
  include: [path.resolve(__dirname, 'src')]
  //exclude: [/node_modules/]
}

If anything is missing, I'm happy to provide info. :)

best regards,

Sebastian

@robmadole
Copy link
Member

Confirmed! We'll start working on getting this fixed up.

@robmadole
Copy link
Member

JS packages bug

@robmadole
Copy link
Member

We have the fix for this and are going to start the release process now.

@robmadole
Copy link
Member

robmadole commented Dec 12, 2018

This should be all fixed up now with 5.6.1. Let us know if you still have issues.

This was referenced Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants