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 support #46

Open
tommybl opened this issue Mar 27, 2021 · 1 comment
Open

IE11 support #46

tommybl opened this issue Mar 27, 2021 · 1 comment

Comments

@tommybl
Copy link

tommybl commented Mar 27, 2021

This package does not work on IE11, as it uses unsupported features:

  • in clean_id.js line 29, use of string interpolation:
return `(${value.replace(/[\\?*+|.^${}[\]()]/g, '\\$&')})`
  • in without.js line 28, use of for...of statement:
for (let name of objectKeys(element))

The package should be transpiled into cross-browser supported code using a tool like Babel, before it's published to NPM.

Thanks!

@calebtr-metro
Copy link

calebtr-metro commented Aug 30, 2021

I was able to get around this by having webpack run this package through babel-loader. In webpack.config.js:

  // IE11
  config.module.rules.push({
    test: /\.js$/,
    include: path.resolve(__dirname, '../node_modules/twig-drupal-filters/'),
    loader: 'babel-loader',
  });

babel.config.js also needed updating:

const sourceType = 'unambiguous';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants