-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[playground] Stencil build errors out about importing packages during rollup #19
Comments
Why was this closed @snario? This is still a problem. We're working around it with IIFEs. |
@joelalejandro @cf19drofxots any thoughts on the fix? |
Some overlapping work with counterfactual/monorepo#692 |
Stencil recommends installing some libraries for |
I also think that this issue is relevant: ethers-io/ethers.js#145 |
@joelalejandro @snario @cf19drofxots Lets move this to the new dapps-bots repo? |
Sure thing. Transferring. |
Done! |
This is the error when
yarn build
is executed inpackages/dapp-high-roller
:'types' is not exported by ../cf.js/dist/index.js
occurs because the dist file forcf.js
does not have the right format. It's usingcjs
which is meant for NodeJS, not ES.When stencil build is doing its rollup, it's expecting an
export
to be present as is the format for theesm
build format.ethers
) seemingly not being distributed for the ES format either, a similar errors occurs.Since we don't have control over the imported libraries' distribution formats, we're required to use a rollup plugin which converts
cjs
(the format that the libraries do support) toesm
(for ES modules).However, configuring the stencil rollup configuration to use
rollup-plugin-commonjs
results in thestencil build
hanging. No further Stencil documentation or issues offer further help on resolving this at the moment.The text was updated successfully, but these errors were encountered: