Skip to content
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

Remove/Replace Rollup.js #9

Closed
pythoneer opened this issue Sep 12, 2021 · 5 comments
Closed

Remove/Replace Rollup.js #9

pythoneer opened this issue Sep 12, 2021 · 5 comments
Assignees

Comments

@pythoneer
Copy link

pythoneer commented Sep 12, 2021

It would be good to have the option to do without Rollup.js and npm entirely. At least in my case i am searching for Rust frontend tools because i want to stay away from npm and its ecosystem. I don't want to go into details about the "why" here, but i am wondering what alternatives we have. I am not very familiar with perseus yet and going through the book Building Your First App i was unpleasantly surprised to see npm i -g rollup which is a show-stopper in my case. I don't want to elevate this as a major problem for the project, because its just my personal taste – but i am wondering if we could have an easy to integrate (rusty) alternative that is as powerful as Rollup.js yet and can serve the same needs. I am very happy with Trunk and Sycamore/seed-rs/yew and was wondering what exactly is different here that make Rollup.js mandatory.

@lukechu10
Copy link
Contributor

Is there something specific that requires a full-blown bundler? The only js required should be that for loading the wasm.

@arctic-hen7
Copy link
Member

I used Rollup simply to create a JS bundle to load the Wasm, and I imagine it could indeed be done without it. I'll look into this further.

@arctic-hen7 arctic-hen7 self-assigned this Sep 12, 2021
@arctic-hen7
Copy link
Member

I too have had enough of JS tools, and as a matter of fact Rollup has been the cause of every single bug report on Perseus thus far!

Given that, I'm fully in support of ditching it in favor of another tool. Given this would be a significant breaking change, I think it would be best to have this done by v0.2.0.

@arctic-hen7
Copy link
Member

Okay, so I was looking through the codebase trying to figure out why I actually used Rollup in the first place. I then discovered that I'm using it solely to wrap an asynchronous JS function that we don't even need. So in other words not only is this a nice idea for cleanliness, it will also make Perseus builds faster! The only drawback to this is that it requires specifying a new js_init file in the Actix Web integration's options. However, no-one except me uses those at the moment (the CLI does it all for you), so that's not a problem! It is still a breaking change though, so this will be included in v0.2.0.

@arctic-hen7
Copy link
Member

This is complete, and will be released with v0.2.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants