Open kristianmandrup opened 7 years ago
Maybe this hack will make it simpler... :)
Basically all described in this blogpost on Custom Elements v1 - hello world where he uses the babel transform. So, how can I add a babel transform plugin to my cycle script!?
Let's add a script that comes with: es6, babel, webpack and custom elements :)
Hi guys,
I'm trying to get custom elements v1 working with Cycle.js. Been on a major quest but almost got it now.
TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
I need a native-shim
Then I'm using document-register-element polyfill, with or without @webcomponents/custom-elements
Basically my main problem now is to get a
babel-plugin-transform
working with your script. Could you please document or advice how to do this. ThanksI need to use babel-plugin-transform-custom-element-classes
.babelrc
I checked babel-loader options but doesn't match with your config (webpack 2+)
Your start script:
So I tried changing start script to and installing the plugins inside
node_modules/cycle-scripts
vianpm
In my app: