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(ssr): poc #17

Merged
merged 7 commits into from
Jun 20, 2024
Merged

Conversation

gabrielperales
Copy link

@gabrielperales gabrielperales commented Jun 10, 2024

I'm not sure if this is the right approach, actually, I think the code should be in the astro:build:done hook, but this code is working for me, so maybe we can use it as a starting point for SSR.

Sorry about changing from yarn to npm, but I was struggling with something related to the package manager and I decided to switch it to NPM. I imagine we can delete those changes from the MR.

@RodrigoTomeES
Copy link
Owner

Ey @gabrielperales thanks for your mr I hope to check it tomorrow!

I have one question, you added babel to be able to transform the classes in the JS server files, it isn't?

@RodrigoTomeES RodrigoTomeES added enhancement New feature or request v2 labels Jun 11, 2024
@RodrigoTomeES
Copy link
Owner

@gabrielperales which errors did you have with yarn? I could install it and the build works

image

@gabrielperales
Copy link
Author

Ey @gabrielperales thanks for your mr I hope to check it tomorrow!

I have one question, you added babel to be able to transform the classes in the JS server files, it isn't?

Exactly. If was just using the regex over the .mjs it could also replace other stuff. In my case, I found it was replacing a variable called block

@gabrielperales
Copy link
Author

@gabrielperales which errors did you have with yarn? I could install it and the build works

I don't remember. Nothing important, but I didn't want to deal with that I tried to make it work as fast as I can 😅

@RodrigoTomeES
Copy link
Owner

RodrigoTomeES commented Jun 11, 2024

Ey @gabrielperales thanks for your mr I hope to check it tomorrow!
I have one question, you added babel to be able to transform the classes in the JS server files, it isn't?

Exactly. If was just using the regex over the .mjs it could also replace other stuff. In my case, I found it was replacing a variable called block

Yeah, I had a similar issue in one of my projects. In my html the package remove the flex word and replace with the minified class. Could you add a test for your use case? Or give me an example to make it

@RodrigoTomeES RodrigoTomeES self-assigned this Jun 14, 2024
@RodrigoTomeES RodrigoTomeES marked this pull request as ready for review June 20, 2024 20:41
@RodrigoTomeES RodrigoTomeES merged commit 9ae2759 into RodrigoTomeES:feature/v2 Jun 20, 2024
6 checks passed
Repository owner deleted a comment from allcontributors bot Jun 20, 2024
Repository owner deleted a comment from allcontributors bot Jun 20, 2024
@RodrigoTomeES
Copy link
Owner

@all-contributors please add @gabrielperales for code

Copy link
Contributor

@RodrigoTomeES

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hybrid mode Implementing SSR support for astro-rename
2 participants