Web Components Middleware Runtime error
tbranyen opened this issue · 5 comments
tbranyen commented
if (REPLACE_CHILD) {
for (let i = 0; i < REPLACE_CHILD.length; i += 2) {
const newTree = REPLACE_CHILD[i];
const instance = createTree.NodeCache.get(newTree);
if (instance.componentDidMount) {
instance.componentDidMount();
}
}
}
tbranyen commented
Also hitting:
renderTree = createTree__default(instance && instance.render ? instance.render(props, instance.state) : newCtor(props));
Seems that the UMD build needs a bit of work with the new shared-internals
module.
tbranyen commented
Also hitting issues where you need to use .default
when accessing module.exports
in the cjs builds:
const Component = require('diffhtml-components/dist/cjs/component').default
Maybe we should add the add-module-exports
to all the CJS builds
mAAdhaTTah commented
Does the / do the umd builds usually include all of the module's dependencies?
tbranyen commented
Yeah, I'd expect everything to be bundled into the UMD build. If you need to get fancier you'd move to CJS/ESM imo.
tbranyen commented
This appears fixed as well in 1.0.0-beta.2