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.lock
and/ui/node_modules
instead 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.js
that writes the necessary hydration code from/astro-hydration/dist/index.html
to a file. - Updates the build step in
/ui/package.json
to also build this Astro project - Removes old
/astro-bundles
directory that was added in the interim - Replaces usages of path with
/astro-bundles
to this new library
Edited by Harumi Jang