tbranyen/diffhtml

Web Components Middleware Runtime error

tbranyen opened this issue · 5 comments

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();
    }
  }
}

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.

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

Does the / do the umd builds usually include all of the module's dependencies?

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.

This appears fixed as well in 1.0.0-beta.2