Replies: 4 comments 1 reply
-
I have been using remix, nx at work for the last 6 months. Allowing the user to specify the directory in I have hosted my remix / nx applications on netlify and vercel, and I think the proposed solution would also simplify deployments on those platforms. |
Beta Was this translation helpful? Give feedback.
-
+1 we also use an NX integrated monorepo and being forced to use a package.json per remix app goes against the grain of why we chose an integrated monorepo in the first place. surely this could be as simple as a config setting as mentioned above? |
Beta Was this translation helpful? Give feedback.
-
At least with the vite version of remix, remix seems to work fine on an integrated repo. on the vite config per project, just need to the ff vite config. export default defineConfig({
root: path.resolve(__dirname, "../.."), // resolves to workspace dir
plugins: [
remix({
appDirectory: path.resolve(__dirname, "app"),
}),
tsconfigPaths(),
],
}); And execute the equivalent of:
Don't forget to clear out |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I've recently began a project where I am using remix with an
nx
monorepo.nx
has a experimental remix plugin: https://nx.dev/recipes/other/remix, code here.But one of the issues is that remix needs a
package.json
file to work, whilenx
proposes to have 1 global package.json - and this discussion isn't really to weigh up the pros/cons of each approach, its more to allow users to have the flexibility to go with either.The code that blocks this from working, from what I can tell is part of the
remix-dev
package:The current implementation throws an error if a package.json doesn't exist.
A simple solution would be to allow users to specify the directory their
package.json
is in, relative to theremix.config.js
file.Would be good to get peoples thoughts on this before opening a PR
EDIT: an alternative approach would be to use pkg-up as a fallback where there is no package.json in the remix root, shout out to @rossipedia for the suggestion
Beta Was this translation helpful? Give feedback.
All reactions