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(remix): add vite mode support #22757

Closed
wants to merge 11 commits into from

Conversation

unrealsolver
Copy link
Contributor

@unrealsolver unrealsolver commented Apr 9, 2024

Current Behavior

Remix plugin is using older 'classic' remix tooling.

Expected Behavior

Remix plugin is using up to date tooling and configurations

Related Issue(s)

#22551

Fixes #
#22035

Checklist:

  • Implement executors support for the 'vite' mode
  • Implement generators for new 'vite' mode
  • Generators having --bundler option to support classic or vite during generation
  • Vite plugin ignoring Remix Vite files for build if remix, but supporting vitest if test config is found
  • Remix plugin supporting vite files only if they are for remix
  • Migration paths for users wishing to migrate from classic to vite
  • docs updates
  • unit tests for plugin
  • e2e tests for executors and plugins

Other fixes changes:

  • remix/dev and other libs are not included for the vite-mode prod build

Preview

You can replace @nx/remix with this repo.
Add this dependency entry into your package.json:

    "@nx/remix": "git@github.com:unrealsolver/nx-remix-vite.git",

https://github.com/unrealsolver/nx-remix-vite/tree/main

Copy link

vercel bot commented Apr 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 10:22am

@Coly010
Copy link
Contributor

Coly010 commented Apr 9, 2024

Hey @unrealsolver

Thanks for the contribution, however, there's a lot more we need to consider to actual support Remix Vite.

While this does allow executors to use vite for remix, there are other things that need to be considered.

  • Is the project using vite, or classic?
    • This will dictate the command to be run
  • Generators having --bundler option to support classic or vite during generation
  • Vite plugin ignoring Remix Vite files for build if remix, but supporting vitest if test config is found
  • Remix plugin supporting vite files only if they are for remix
  • Migration paths for users wishing to migrate from classic to vite
  • docs updates
  • unit tests for plugin
  • e2e tests for executors and plugins

I really do appreciate you attempting to help out to get this over the line, but the scale of the work involved is large.
Remix Vite support is on my list to support, and I'll be working on it soon.

@unrealsolver
Copy link
Contributor Author

@Coly010 , thanks for the check-list, I'll add it to the PR to track progress. This PR is still WIP, I just did the most critical work so I can use Nx with manually migrated project locally. I'll put other pieces of work during the next week or so.

@unrealsolver unrealsolver changed the title refactor(remix): use remix vite in executors (wip) feat(remix): add vite mode support Apr 15, 2024
@pcfreak30
Copy link

@Coly010 is there any timeline on getting this done. Having to rely on some custom patches to keep my build process working.

There is also the fact now remix and react router are merging which may require more work https://remix.run/blog/merging-remix-and-react-router.

Thanks.

@Coly010
Copy link
Contributor

Coly010 commented May 22, 2024

No timeline yet unfortunately and yes, currently aware of the react-router merger. In contact with Ryan Florence about it 👍

@ReptoxX
Copy link

ReptoxX commented Jun 26, 2024

I'm not quite sure if you're about to use code from this pr, but if so please consider public being build inside build/client instead of copying it over as it's not necessary.
Also an option for defining an own server file to get executed would be beneficial. Right now i wrote my own executor to leverage esbuild to build the server (ts) and place it inside the dist folder.

@Coly010
Copy link
Contributor

Coly010 commented Jul 22, 2024

I'm going to close this PR as it has not been updated in a few months now.

We have Vite support added to our internal roadmap and will be addressing it soon

@Coly010 Coly010 closed this Jul 22, 2024
@ksjogo
Copy link

ksjogo commented Jul 24, 2024

I'm going to close this PR as it has not been updated in a few months now.

We have Vite support added to our internal roadmap and will be addressing it soon

Good to hear, is there some way to follow that progress?

Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants