Experiment: Modularize nicegui.js with esbuild bundler - #114
Draft
evnchn wants to merge 1 commit into
Draft
Conversation
- Split monolithic nicegui.js into organized modules in src/ - Add esbuild build system with build.mjs script - Footer flattens exports to window.* for compatibility - Restore public API: window.app and window.mounted_app - Exclude generated nicegui.js from end-of-file-fixer Alternative to Rollup - demonstrates footer workaround for flattening window globals without nested structure. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this branch does
Splits the monolithic nicegui.js into organized ES modules under src/ (app.js, colors.js, constants.js, elements.js, events.js, render.js, utils.js, quasar-hack.js) with an esbuild build system. Uses a footer workaround to flatten exports to window.* for backward compatibility. Preserves window.app and window.mounted_app public API.
Status
Experimental — one of two paired JS bundler experiments (see also: temp/rollup-refactor). This branch uses esbuild. Valuable as a reference for nicegui.js modularization approaches and bundler comparison.
Files changed
18 files, key additions:
nicegui/static/src/*.js(8 modules),nicegui/static/build.mjs,nicegui/static/package.jsonUpstream PR
None yet