-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Remix Build uses Classic Compiler over Vite when specifying build target #29745
Comments
Yea, we had the same issue. FROM node:lts-alpine AS production-dependencies-env
COPY ./package.json package-lock.json /app/
COPY .npmrc /root/
WORKDIR /app
RUN npm ci --omit=dev
FROM node:lts-alpine
ENV NODE_ENV=production
COPY --from=production-dependencies-env /app/node_modules /app/node_modules
COPY ./apps/my-app/build /app/build
WORKDIR /app
CMD ["./node_modules/.bin/remix-serve", "./build/server/index.js"] Basically, we build the app with The downside is that if you have a large monorepo, with a lot of unrelated dependencies to the project that your building at the time, there will be a bloated docker image. It would have been a lot better if we could generate a properly scoped package.json. |
Hey @cyberarc8 ! This is expected at this moment in time and not a bug. Vite support for Remix is provided by the What we had generated for you OTTB should have been fine to build with Vite. |
Hey @Coly010 ! Thank you for your reply, I'm not sure if I fully understand you. How would we maintain a package.json at project root - doesn't that interfere with how Nx and Single Version Policy work? How can we keep it in sync with the root package.json? My understanding was that the generatePackageJson option is there to avoid this scenario of two conflicting package.json files. Please let me know if I'm missing something. |
If you don't run npm install in the project root, then it'll fallback to the node_modules at the workspace, so it's fine to have a package.json in the project root. The |
Current Behavior
When trying to configure the options of @nx/remix:build executor, Vite Compiler is not used.
We need to generate a package.json for deployment with server deps.
With
the build is using Classix Remix Compiler, even though the project was just created with vite.config.ts and without remix.config.js.:
Expected Behavior
Configuring executors options doesnt change the Build Tool.
With
"targets": {}
the Build is correctly based on Vite:GitHub Repo
No response
Steps to Reproduce
npx create-nx-workspace@latest acme --preset=apps
npx nx add @nx/remix
npx nx g @nx/remix:app apps/myapp
npx nx build myapp
at this point creates a build folder of correct Vite structure (build/client & build/server) in apps/myappNx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: