comunica icon indicating copy to clipboard operation
comunica copied to clipboard

Incompatible with rollup

Open rubensworks opened this issue 5 years ago • 6 comments

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

rubensworks avatar May 02 '20 13:05 rubensworks

@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 avatar Oct 21 '20 09:10 rubensworks

@rubensworks, thanks. I've tried that and added polyfills, now I get this error at runtime:

Uncaught TypeError: iI is undefined engine-default.js:560 index-browser.js:17

retog avatar Oct 22 '20 10:10 retog

Any update on rollup support? Currently wanting to use the awesome comunica in a vite project (which uses rollup)

afizzycola avatar Jul 06 '22 13:07 afizzycola

@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.

rubensworks avatar Jul 06 '22 13:07 rubensworks

@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.

jacoscaz avatar Jul 06 '22 14:07 jacoscaz

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.

afizzycola avatar Jul 11 '22 07:07 afizzycola

Thanks to the removal of Node.js deps, this issue should be resolved.

rubensworks avatar Apr 27 '23 12:04 rubensworks