Skip to content
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

feat(astro-angular): enabled angular prod build #66

Merged
merged 3 commits into from
Aug 30, 2022

Conversation

simitch1
Copy link
Contributor

I think that to enable angular prod mode like requested in this issue #64 , we could simply use the astro:build:start or astro:build:setup hook to enable the prod compilation a single time.
I tried the build locally and seems to work, but I don't really know how to test further.

Before:
image

After:
image

Tests are failing right know but build is good. If the solution is ok I can work on it.
Let me know what do you think.

@simitch1 simitch1 closed this Aug 30, 2022
@simitch1 simitch1 deleted the astro-angular-prod-mode branch August 30, 2022 17:25
@simitch1 simitch1 restored the astro-angular-prod-mode branch August 30, 2022 17:26
@simitch1 simitch1 reopened this Aug 30, 2022
@brandonroberts
Copy link
Member

The test failure is probably because it needs the jest-preset-angular package for testing. We can switch to running the tests with Vitest and the Angular plugin

@brandonroberts
Copy link
Member

Based on the Astro docs, this seems like the appropriate place to use this.

https://docs.astro.build/en/reference/integrations-reference/#astrobuildsetup

@simitch1
Copy link
Contributor Author

I switched from jest to vitest. Modified the tests and used the astro:build:setup hook instead of astro:build:start.

@brandonroberts
Copy link
Member

Sorry about the miscommunication. I meant to post the build start link instead of the build setup one. I think either is suitable though so it can stay as is.

Copy link
Member

@brandonroberts brandonroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brandonroberts brandonroberts merged commit b0235fc into analogjs:main Aug 30, 2022
@brandonroberts
Copy link
Member

Thanks a bunch! @allcontributors add @simitch1 for code

@allcontributors
Copy link
Contributor

@brandonroberts

I've put up a pull request to add @simitch1! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants