-
Notifications
You must be signed in to change notification settings - Fork 32
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
Overhaul build process #65
base: master
Are you sure you want to change the base?
Conversation
awesome! Having a tool like rollup meant for making multiple builds would be great! You'll have to forgive me because I haven't used rollup before, so I probably have some naive questions. My main concern is just making sure we don't break any current implementations, so I have a few questions in mind: Are all the current builds found in https://unpkg.com/browse/[email protected]/dist/ still there, (for situations where people are directly referencing the build files through a script tag)?
Could Can people still Really asking because of my lack of knowledge, but what is the "exports" key in the package.json? Is that something used by rollup or other tools? I use GeoRaster in another project, can I still make a build with the worker inlined? (Probably a silly question, but I just want to make sure we aren't prevent other projects from creating single file builds) Any other significant changes or implications on how people implement georaster? If I want to require georaster in node, can I require a file directly or do I have to require the build? Otherwise, I think we can cut a georaster@next release and test integrating with that. Can the browser/jsbundle builds have a .map file? Not a strict requirement, because it seems we don't currently have one, but a nice to have :-) Thoughts? Thank you! I learned a lot about rollup just looking at your code! |
I've made a few little tweaks to the config based on your requests @DanielJDufour
So I think you'd publish this as a new major version to prevent any accidental breakages in terms of requiring non-existant/moved files.
Yep - so that should people ppl to
The default approach in node should automatically direct ppl to the node-compatible-build, but if really necessary people could still do something like
This is a new-ish NodeJS feature for packaging. It's probably not entirely necessary here, but in theory it allows you export multiple modules (which could be handy for shipping node vs browser user modules)... now that I think about it maybe that's something to explore further...
No worries. This is a more complex package because of the node vs browser differences (with cross-fetch) so it's using a few different output types. But once you get going with rollup I find it easier than webpack to understand how to configure and create differing outputs. And for simple libraries (eg this one of mine) it's really straight forward. Two final things
|
Thankyou for this, it removes 392(!) dependencies. I did get it to work, but only after disabling the web worker due to it not being able to find |
This PR basically overhauls the build setup for georaster
This probably still needs a bit of testing to make sure nothing is broken but 🤞 I reckon it's a pretty good start.