Skip to content

Issue with building for IE11 #12283

Answered by AjayPoshak
dan2k3k4 asked this question in Q&A
Oct 30, 2020 · 2 comments · 4 replies
Discussion options

You must be logged in to vote
  1. First of all, I ran this command to figure out which of your dependencies publish ES6.
    npx are-you-es5 check ./

  2. Then in webpack configuration on line no 18, I modified the exclude option to stop excluding the packages which publish ES6.
    exclude: [/node_modules\/(?!(twig|twig-drupal-filters|lit-html|lit-element)\/).*/],

  3. Still there were arrow functions in the dist/scripts.js. Upon some research, I found out that it was webpack's boilerplate code, which contains the arrow functions. So I downgraded the webpack to version 4.41.5 [lastest previous major version I found].

And it worked. I believe there must be configuration in webpack to turn off arrow functions in webpack's runtime co…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@nicolo-ribaudo
Comment options

@dan2k3k4
Comment options

Comment options

You must be logged in to vote
2 replies
@dan2k3k4
Comment options

@suhanw
Comment options

Answer selected by dan2k3k4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants