Skip to content

IE11 SCRIPT1003: ':' expected #14382

Closed
Closed
@HerrBastiii

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions