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: get react file-upload example working with vite #203

Merged
merged 1 commit into from Jan 4, 2023

Conversation

travis
Copy link
Contributor

@travis travis commented Dec 22, 2022

create-react-app projects don't have the proper loaders to handle loading typescript in dependencies. vite is used in our other examples so it makes sense to me that we'd use it for react as well.

putting this in a separate PR before I update all the other examples to get feedback before committing to this approach, and to avoid too many merge conflicts with the efforts underway to update examples by @cmunns and @natevw

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 22, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bc5ed29:

Sandbox Source
file-upload Configuration
@w3ui/example-react-sign-up-in Configuration
@w3ui/example-react-uploads-list Configuration
@w3ui/example-solid-file-upload Configuration
@w3ui/example-solid-sign-up-in Configuration
@w3ui/example-solid-uploads-list Configuration
@w3ui/example-vue-file-upload Configuration
@w3ui/example-vue-sign-up-in Configuration
@w3ui/example-vue-uploads-list Configuration

`create-react-app` projects don't have the proper loaders
to handle loading typescript in dependencies. `vite` is used in our other examples so it makes sense to me that we'd use it for react as well.

putting this in a separate PR before I update all the other examples to get feedback before committing to this approach, and to avoid too many merge conflicts with the efforts underway to update examples by @cmunns and @natevw
@jchris
Copy link
Contributor

jchris commented Dec 22, 2022

LGTM, only question is does it make it more confusing for beginners to get hacking on it? Probably it's fine

Copy link
Contributor

@jchris jchris left a comment

Choose a reason for hiding this comment

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

👍

@natevw
Copy link
Contributor

natevw commented Jan 3, 2023

Overall looks good to me too. +1 on giving the JSX files an actual .jsx extension, and cleaning up the public folder.

I don't think this will cause me much grief merging with my changes on #204, although it might be worth discussing the plan for all the other examples — I'm happy to merge this as a smaller trial run but otoh I don't see a big reason not to just plow forward with similar changes on all examples at once?

@travis
Copy link
Contributor Author

travis commented Jan 3, 2023

ok amazing - @alanshaw I'd like your signoff before I convert the rest of the examples to vite - happy to add that to this PR if we're all aligned

@travis
Copy link
Contributor Author

travis commented Jan 3, 2023

only question is does it make it more confusing for beginners to get hacking on it?

I don't think so honestly - tbh I would never recommend create-react-app to beginners these days, and we already use vite for all the other examples.

more detailed CRA vs Vite breakdown here: https://semaphoreci.com/blog/vite

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

👍 happy to use newer and better tooling and it's nice to have consistency with other examples anyway.

@travis travis merged commit 3bfef51 into chore/pnpm Jan 4, 2023
travis added a commit that referenced this pull request Jan 5, 2023
following the example of #203,
move the rest of the react examples to vite
travis added a commit that referenced this pull request Jan 5, 2023
following the example of #203,
move the rest of the react examples to vite
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.

None yet

4 participants