You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doesn't support vite.config.ts, only vite.config.js|.mjs so now you will essentially have zero inferred dev / build commands.
On top of that, even if you switch your vite config to javascript, you now also need to make sure you don't pass any extra arguments to remix. Their docs allow you to do something like remix({ ...opts }) however adding properties to that function will break the includes check here because it looks for remix() without options as a string.
The expected behavior would be if a vite.config.ts is added to a remix project it should pick up the remix vite:dev / build commands, and also we should be able to support remix plugin options within the vite config file.
Might be able to make a PR eventually, but I think if the targeting are fixed it should work out of box with minimal changes.
There's also probably a larger conversation about migrating the remix plugin generator to use vite out of box, but I'll save that for a separate issue.
Related links: #22613 #27330 #27713 #22086 - happens with non ts vite.config which is a workaround you have to do for this.
The text was updated successfully, but these errors were encountered:
…7923)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->
<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->
<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->
## Current Behavior
<!-- This is the behavior we have today -->
The Remix plugin is too strict when finding Remix Vite projects
## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
The Remix plugin should be more permissive in finding Remix Vite
projects
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
Fixes#27884
(cherry picked from commit a7aab61)
Current Behavior
Right now if you want to create a remix project with NX you follow the guide here: https://nx.dev/recipes/react/remix which will create a Remix "classic" application. You can then migrate this to v2/vite by adding the vite configuration https://remix.run/docs/en/main/file-conventions/vite-config
Here lies the problem.
nx/packages/remix/src/plugins/plugin.ts
Line 370 in 2eb5592
nx/packages/remix/src/plugins/plugin.ts
Line 59 in 2eb5592
remix({ ...opts })
however adding properties to that function will break the includes check here because it looks forremix()
without options as a string.nx/packages/remix/src/plugins/plugin.ts
Line 380 in 2eb5592
Expected Behavior
The expected behavior would be if a vite.config.ts is added to a remix project it should pick up the remix vite:dev / build commands, and also we should be able to support remix plugin options within the vite config file.
GitHub Repo
No response
Steps to Reproduce
remix({})
to mimick options passing)nx show project {projectname}
and note that there are no remix OR vite commands inferred.Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
Might be able to make a PR eventually, but I think if the targeting are fixed it should work out of box with minimal changes.
There's also probably a larger conversation about migrating the remix plugin generator to use vite out of box, but I'll save that for a separate issue.
Related links:
#22613
#27330
#27713
#22086 - happens with non ts vite.config which is a workaround you have to do for this.
The text was updated successfully, but these errors were encountered: