-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Future / pre-built manager - using esbuild #18550
Conversation
- We prebundle the entire lib/ui with tsup. - We tell the manager builder to serve lib/ui/dist as part of staticDirs - We add the prebundled runtime to the main template as script reference This works! Webpack builds ONLY the addons, not the manager UI! But there's a problem... the manager gets react components injected into it. These react components do not share the same version of react. That causes the well know: hooks-call problems. So left to investigate: - Will this really work? Does bundling lib/ui and everything it needs break nothing? - How to force a single version of react? (all dependencies normally coming from the manager, really)
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 8a703bf. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
I will delete the old |
…the manager builder, because it's not configurable anyway
use playright in the bench
Build: Add a check script to each package
# Conflicts: # lib/manager-webpack5/src/presets/manager-preset.ts
…into future/prebuilt-manager-esbuild # Conflicts: # addons/storyshots/storyshots-puppeteer/package.json # yarn.lock
# Conflicts: # addons/essentials/package.json # frameworks/html-webpack5/package.json # frameworks/preact-webpack5/package.json # frameworks/react-webpack5/package.json # frameworks/server-webpack5/package.json # frameworks/svelte-webpack5/package.json # frameworks/vue-webpack5/package.json # frameworks/vue3-webpack5/package.json # frameworks/web-components-webpack5/package.json # lib/blocks/package.json # lib/cli/src/versions.ts # lib/components/package.json # lib/core-common/package.json # lib/core-server/package.json # lib/core-server/src/utils/open-in-browser.ts # lib/manager-webpack5/package.json # lib/manager-webpack5/typings.d.ts # lib/theming/package.json # lib/ui/package.json # presets/html-webpack/package.json # presets/preact-webpack/package.json # presets/react-webpack/package.json # presets/server-webpack/package.json # presets/svelte-webpack/package.json # presets/vue-webpack/package.json # presets/vue3-webpack/package.json # presets/web-components-webpack/package.json # renderers/html/package.json # renderers/preact/package.json # renderers/react/package.json # renderers/server/package.json # renderers/svelte/package.json # renderers/vue/package.json # renderers/vue3/package.json # renderers/web-components/package.json # yarn.lock
add support for setting config after manager has loaded
Refs and async configs are in. Theme flashing isn't an issue! |
And it's ready for review, should be low-noise now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! A couple of suggestions for improvement, but generally speaking it's very nice!
What I did
This is looking promising!
@storybook/builder-manager
lib/ui
to bundle everything usingtsup
lib/ui
calledruntime
, which is self-invokingdist
oflib/ui
as-is including the runtimemanagerEntries
throughesbuild
lib/ui
is globalized & replaced