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
Hi, I am trying to use this on my docker prod. When I use it on my dev and follow https://symfony-vite.pentatrion.com/guide/installation.html and do npm run dev it all works fine. But on prod, I did npm run build and it did not work (i did not get all my CSS and images) ,while on prod do I still need to run npm run dev?
I also get /img/professionals/prof-banner-one.jpg referenced in /var/www/html/assets/app.css didn't resolve at build time, it will remain unchanged to be resolved at runtime when I run npm run build
my config:
import symfonyPlugin from "vite-plugin-symfony";
/* if you're using React */
// import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [
/* react(), // if you're using React */
symfonyPlugin({
viteDevServerHostname: 'localhost',
}),
],
build: {
rollupOptions: {
input: {
app: "./assets/app.js",
},
},
assetsInlineLimit: 0
},
server: {
host: '0.0.0.0',
// hmr: {
// protocol: "ws"
// }
}
});
and docker-compose for prod
image: node:21-alpine
user: "${UID}:${GID}"
working_dir: /var/www/html
volumes:
- ./:/var/www/html
command: sh -c "npm install && npm run build"
It's my first time using this so I appreciate any help.
The text was updated successfully, but these errors were encountered:
Hi, I am trying to use this on my docker prod. When I use it on my dev and follow https://symfony-vite.pentatrion.com/guide/installation.html and do
npm run dev
it all works fine. But on prod, I didnpm run build
and it did not work (i did not get all my CSS and images) ,while on prod do I still need to runnpm run dev
?I also get /img/professionals/prof-banner-one.jpg referenced in /var/www/html/assets/app.css didn't resolve at build time, it will remain unchanged to be resolved at runtime when I run
npm run build
my config:
and docker-compose for prod
It's my first time using this so I appreciate any help.
The text was updated successfully, but these errors were encountered: