teleport-code-generators
teleport-code-generators copied to clipboard
Building the stencil component with the lerna linked package fails
It looks like a rollup problem, but I don't have any experience with it so I'll leave an issue for now in case someone wants to grab this.
[ ERROR ] Rollup: Missing Export: src/components/editor/lazy_jxjixtlsrc9ak1swsggwlw-editor.js:10:9
'createReactComponentGenerator' is not exported by
../teleport-component-generator-react/lib/index.js
L0: 8: import { h } from '@stencil/core';
L0: 9: import CodeFlask from 'codeflask';
L0: 10: import { createReactComponentGenerator } from '@teleporthq/teleport-component-generator-react';
L0: ^
L0: 11: import { createVueComponentGenerator } from '@teleporthq/teleport-component-generator-vue';
L0: 12: import Prism from 'prismjs';
[42:05.3] dev server: http://localhost:3333/
[42:05.3] build failed, watching for changes... in 4.06 s
Currently the teleport-repl-component
works with the npm versions 0.7 of the generators. You can reproduce this error by trying to update the package.json to use the latest 0.8.1 and do a yarn
inside the root of the monorepo, so lerna will do yarn link
for the packages.
May be we should keep an eye on this --> https://github.com/ionic-team/stencil/issues/1491
it is indeed a problem with symlinks. the module bundler does not work from rollup unless modules are in the current directory node_modules
. so if I install version 0.7, all dependencies are brought down into the repl/node_modules
and stencil recognizes the commonjs imports and everything. but if dependencies are taken directly as symlinks from the top node_modules
rollup doesn't understand commonjs. I believe this could be fixed by including that folder in the rollup-plugin-commonjs
inside stencil, but there's no way to configure that :(