Open abcdw opened 1 month ago
hi there :) i think specifically the jbrowse-plugin-template has this dependency.
here is an example of a plugin i made that does not use the jbrowse-plugin-template rollup approach, it actually uses esbuild https://github.com/GMOD/jbrowse-plugin-protein3d/blob/master/esbuild.mjs
i'm not sure if that approach would be ideal for your approach
we can try to also see if we can make a minimal and modern rollup setup
on a technical level, the only really custom things we do in jbrowse plugins is
a) make a single file bundle (generally umd) b) resolve a bunch of externals (we get the list of re-exports from the @jbrowse/core/ReExport/list) which prevents e.g. the plugin from loading a different version of react and other stuff. this is not strictly required, you can also manually use "jbrequire" to get those externals but the remapping of externals allows you to use plain import statements
(moved issue to the jbrowse-plugin-template repo)
(might need to apply fix to @jbrowse/development-tools in the main repo, but probably best here)
Describe the bug jbrowse depends on
rollup-plugin-node-globals
and it have hardcoded ecmascript version: https://github.com/calvinmetcalf/rollup-plugin-node-globals/blob/edbbbbd7c485452a0168b27caa5ad49e58cf3cfe/src/inject/index.js#L59Thus if you have modern js in your project, it won't build.
To Reproduce
For example add a big int literal in the code jbrowse-plugin-template:
-0x8000_0000_0000_0000n
.And try to build the plugin.
Expected behavior
To build successfully.
Screenshots
Version:
https://github.com/GMOD/jbrowse-plugin-template/commit/0249180eb48b25ba7c8a1a7e630fe7c958cd7e71