Description
Is your feature request related to a problem?
Currently CLI modifies user's astro.config.ts
via AST transforms using Babel. This works really well but it quite heavy to maintain.
tutorialkit/packages/cli/src/utils/astro-config.ts
Lines 78 to 148 in 9333065
Describe the solution you'd like.
Check if direct Babel usage could be replaced with magicast
. It provides much nicer API to work with AST transforms. This package is also used by Vitest, where we modify user's vitest.config.ts
. It's very similar to what TutorialKit does.
We should also add similar unit tests: https://github.com/vitest-dev/vitest/blob/main/test/coverage-test/test/threshold-auto-update.unit.test.ts
Describe alternatives you've considered.
Keep maintaining the direct Babel integration. It's reliable and does exactly what we need it to, but it's not as easy to maintain.
Additional context
No response