feat(build) :: bundle the browser scripts with Rolldown - #1458
Conversation
e86d210 to
b58f12c
Compare
b58f12c to
a2f7995
Compare
a2f7995 to
901e93b
Compare
901e93b to
2647b34
Compare
Before SQLPage prepended 3rd party dependencies to frontend scripts and shared state throuh globals. Now we use Rolldown to bundle and minify frontend assets into `frontend/dist`. This also caused files to be typechecked for the first time so some smaller changes, like `ChartPoint.y`, had to be made. Rolldown is also available on crate.io, so we could also migrate to a unified build.rs in the future or use nix.
2647b34 to
739aebb
Compare
| "/build.rs", | ||
| "/sqlpage", | ||
| "/frontend/dist", | ||
| "/node_modules/@tabler/core/dist/css/tabler.min.css", |
There was a problem hiding this comment.
Do we still need all the individual files here?
There was a problem hiding this comment.
yes, 3rd party deps are not bundled until #1460
| "tomselect.js", | ||
| &["tom-select/dist/js/tom-select.popular.min.js"], | ||
| "frontend/dist/apexcharts.js", | ||
| &["node_modules/apexcharts/dist/apexcharts.min.js"], |
There was a problem hiding this comment.
I think we should do a clean cut. Drastically simplify build.rs, and not introduce this intermediary state where building the final frontend assets is handled partially by our custom bundler and partially by an off-the-shelf one
There was a problem hiding this comment.
this is the indented end goal of the stack. I am just breaking it up by review able fix/feature without any regression as it seems we want to merge one by one
|
We should be able to make this pr neutral or maybe even negative in terms of complexity and lines of code. |
|
@lovasoa I've added #1470 to the stack to further make the changes in the stack net negative. |
Before SQLPage prepended 3rd party dependencies to frontend scripts and shared state throuh globals.
Now we use Rolldown to bundle and minify frontend assets into
frontend/dist. This also caused files to be typechecked for the first time so some smaller changes, likeChartPoint.y, had to be made.Rolldown is also available on crate.io, so we could also migrate to a unified build.rs in the future or use nix.
Stack created with GitHub Stacks CLI • Give Feedback 💬