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

Fix react-website example #35

Merged
merged 2 commits into from
Dec 3, 2023

Conversation

MichalMartinek
Copy link
Contributor

When I ran the react-website example, what happened was that the Wing Console kept refreshing over and over and was not usable at all. After trying to work around this via StaticWebsite and the custom OnDeploy function, I realized that it recompiles whenever a file in the folder or subdirectory where the main.w file itself is located changes. Wing in the case of React application changes the public/wing.js file after every deployment, causing another deployment in the old example. I've just changed the directory structure to keep the application in separate directory and it works.

Btw Create-react-app is deprecated, but it's working with Vite and Svelte with only few changes.

@MichalMartinek
Copy link
Contributor Author

I've tried deploying it to AWS and it works fine.

@staycoolcall911
Copy link
Contributor

That looks awesome @MichalMartinek! I've assigned @tsuf239 who originally developed the ex.ReactApp resource. She'll review your PR in the next few days

Copy link
Contributor

@tsuf239 tsuf239 left a comment

Choose a reason for hiding this comment

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

Great work, thanks for noticing!! 🙏

examples/react-website/website/public/wing.js Outdated Show resolved Hide resolved
@tsuf239 tsuf239 merged commit 8c457f4 into winglang:main Dec 3, 2023
11 of 27 checks passed
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.

3 participants