Closed mburger81 closed 2 years ago
Hey @mburger81 👋
It's not entirely clear to me what the bug being reported is from the issue summary. This reads as multiple issues that you're running into while getting rollup plugin(s) configured. This issue tracker is unable to provide support-related questions. For those, I'd suggest asking in the Stencil Slack or the Ionic Forums.
I'm going to close this issue as a support-related ticket. If you feel there is a bug in Stencil, can you please open a new issue with a reproduction case that includes the minimal amount of code to reproduce the issue?
Thanks!
Thanks for the issue! This issue appears to be a support request. We use this issue tracker exclusively for bug reports and feature requests. Please use our slack channel for questions about Stencil.
Thank you for using Stencil!
Prerequisites
Stencil Version
2.17.1
Current Behavior
We try to make a crypto dApp with stenciljs. Doing this we discovered several issues with rollup bundling and probably with the plugins for node polyfills, commonjs and nodeResolver.
first of all when we start a simple dApp with @walletconnect we run into issues like this
Which is fine because we know we have to use the "rollup-plugin-node-polyfills", but I use "rollup-plugin-polyfill-node" because its never and mantained compared to ionic's, so we load the plugin just like this
issue now we get this error
TypeError: Cannot read properties of undefined (reading 'env')
I think this means we have to tell atnodeResolver
plugin to compile forbrowser
, so we setup this in the configurationAnd here we have our first issue, because if we use the config property
nodeResolve
nothing changed, but if we load the external@rollup/plugin-node-resolve
and load it onrollupPlugins.before
this error pass away. So it seems like the internalnodeResolve
doesn't work.issue
TypeError: Failed to resolve module specifier "process". Relative references must start with either "/", "./", or "../"
I don't know why this is happening, this is happening for all imports of node polyfills likeprocess
,buffer
,stream
and so on. I'm not sure why this is happening because this should resolve therollup-plugin-polyfill-node
plugin? But It seems I can omit this errors using the@rollup/plugin-alias
plugin beforenodeResolve
plugin, like thisissue now I got this error
It's a nightmare.
I thinks also we should set
transformMixedEsModules
toplugin-commonjs
which is another issue IMO.Expected Behavior
I would like that the plugins work to get work the node polyfills like they should work
Steps to Reproduce
Clone https://github.com/mburger81/stencil-dapp and try, maybe you should start commenting all the plugins
Code Reproduction URL
https://github.com/mburger81/stencil-dapp
Additional Information
No response