Repository navigation
refactor(pagebuilder): migrate to @puckeditor/core and auto-load module CSS - #10
Merged
Merged
Conversation
…le CSS Replace @measured/puck@0.18 with @puckeditor/core@0.21 (package rename, same API). Add automatic CSS injection in resolvePage() so modules no longer need to manually load their stylesheets at runtime. - Update all imports from @measured/puck to @puckeditor/core - CSS import path: @measured/puck/dist/index.css → @puckeditor/core/puck.css - Move build-time CSS import to Pages/index.ts entry point - Delete puck/load-css.ts and remove useEffect(loadPuckCss) from views - ensureModuleCss() in resolve-page.ts handles CSS for all modules
antosubash
force-pushed
the
claude/hungry-newton
branch
from
March 26, 2026 22:58
8371ba8 to
ef1c429
Compare
2 of 5 tasks
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.
Summary
@measured/puck@0.18to@puckeditor/core@0.21(package rename, same API)resolvePage()so modules no longer need to manually load their stylesheetspuck/load-css.tsand all manualloadPuckCss()calls from Editor/Viewer componentsWhat changed
packages/SimpleModule.Client/src/resolve-page.ts—ensureModuleCss()auto-injects a<link>tag for/_content/{ModuleName}/{modulename}.cssbefore loading any module's pages. Usesonerrorto silently handle modules without CSS. Idempotent via aSet.modules/PageBuilder/src/PageBuilder/:package.json—@measured/puck@^0.18.0→@puckeditor/core@^0.21.1@measured/puckto@puckeditor/corePages/index.ts— addedimport '@puckeditor/core/puck.css'(build-time CSS extraction)puck/load-css.ts— deleted (no longer needed)Views/Editor.tsx,Views/Viewer.tsx— removedloadPuckCssimport anduseEffectcallTest plan
npm run build --workspace=@simplemodule/pagebuilderbuilds without errorsdotnet buildsucceeds🤖 Generated with Claude Code