Hydration library for code components
Closes #3500058
This MR
- Adds an Astro project as an npm workspace
- using npm workspace means this new library's package.lock and node_modules dependencies are part of
/ui/package.lockand/ui/node_modulesinstead of having its own in its directory. - Astro built files are outputted in
/ui/lib/astro-hydration/dist
- using npm workspace means this new library's package.lock and node_modules dependencies are part of
- Added README.md
- astro-hydration's build step also calls a
extract-hydration-script.jsthat writes the necessary hydration code from/astro-hydration/dist/index.htmlto a file. - Updates the build step in
/ui/package.jsonto also build this Astro project - Removes old
/astro-bundlesdirectory that was added in the interim - Replaces usages of path with
/astro-bundlesto this new library
Edited by Harumi Jang