Incompatible with rollup
Issue type:
- :bug: Bug
Description:
When using this package in the browser using Rollup, Components.js seems to be included. However, our package.json has been configured in such a way that any usages for the browser will never invoke any Components.js logic, which should cause it to be excluded from any browse builds. When using Webpack, this works as intended.
At the moment, it is unclear if this is a bug in Rollup or on our end.
Originally reported by @retog in https://github.com/LinkedSoftwareDependencies/Components.js/issues/18
Example repo illustrating the issue: https://github.com/retog/rollup-comunica
@retog I just did a quick web search, and came across this: https://www.npmjs.com/package/@rollup/plugin-node-resolve#browser Have you tried this before?
@rubensworks, thanks. I've tried that and added polyfills, now I get this error at runtime:
Uncaught TypeError: iI is undefined
Any update on rollup support? Currently wanting to use the awesome comunica in a vite project (which uses rollup)
@afizzycola No one is actively working on this at the moment unfortunately. If this functionality is important for you, there is the option to place a bounty on this via the Comunica Association, so that we can find and hire a developer to make this work.
@afizzycola @retog as a workaround, you can create a bundle out of your Comunica configuration of choice using Webpack as I'm doing in https://github.com/belayeng/quadstore-comunica/blob/7ffec31e4543e71652d009f828bf4212bc38570c/engine/webpack.config.js . The resulting file can then be used with Rollup.
Thank to you both for the swift replies. @jacoscaz I will take a look at this workaround. @rubensworks will consider if I can pool some funds.
Thanks to the removal of Node.js deps, this issue should be resolved.