0

Here is my project:

https://github.com/march23hare/parcel-scaffolding-web-components/tree/test-custom-elements

My goal is:

  1. Using Parcel.js bundler.
  2. Vanilla JS and Web Components are the major tech-stack.
  3. Support IE 11.

So I make a configuration for babel, .babelrc.

And use Web Components' polyfill(https://github.com/webcomponents/custom-elements).

Then bundle it with Parcel.js.

The test component work properly on the modern browsers.

But for IE 11, it didn't.

I have no idea what is causing the problem.

Could you please help me?

Grant Miller
  • 27,532
  • 16
  • 147
  • 165
Kiwan Lim
  • 1
  • 1
  • Check dev-tools in IE to reveal any scripting error – thsorens Oct 02 '18 at 08:49
  • To support IE11, it is usually sufficient to install babel-polyfill, and import that as the first line of your rendered application. import 'babel-polyfill'; – thsorens Oct 02 '18 at 08:51
  • I solve this problem myself. But not clear. Anyway I did remove some plugin settings from .babelrc then it was suddenly solved. – Kiwan Lim Oct 04 '18 at 04:01
  • But there is another issue popped out. The CSS code written in a custom element class is not converted properly by postcss & postcss-presets-env. I decided to pause this project and to use Polymer LitElement. – Kiwan Lim Oct 04 '18 at 04:04

0 Answers0