-
-
Notifications
You must be signed in to change notification settings - Fork 779
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
how to install webpack encore and npm #536
Comments
I recommend trying this solution: #497 (comment) |
In your Dockerfile add following lines
|
Probably, better so switch to Symfony Asset Mapper (a replacement for Webpack Encore) |
I tried it on docker windows, the perf was really bad i switched back to webpack. |
We'll probably push the user to use AssetMapper, see : #475 (comment) |
In my case i want to add DaisyUi to my projet, following this instruction I don't see how it's possible to add daisyui only with the AssetMapper. I think in some case, npm is probably still necessary |
@quentinRogeret34 It's difficult to offer webpack integration while maintaining the spirit of this template: |
Is there going to be much thought behind code bases that are older/heavily reliant on webpack? |
AssetMapper has no requirements, so even using this template with a webpack doesn't change its current use other than the adaptions needed. In the comments to the issue mentioned, we talk about conditioning the command for preparing assets to the presence of the “importmap.php” file, which will therefore not be present for apps with webpack. |
For anyone looking for an alternative solution, I use a multi-stage build ## Build assets outside of primary image
FROM python:3.11.9-alpine AS assets
RUN apk update && apk add yarn make g++ git
RUN mkdir /app
COPY ./application/package.json /app
COPY ./application/webpack.config.js /app
COPY ./application/yarn.lock /app
COPY ./application/assets /app/assets
WORKDIR /app
RUN yarn install --pure-lockfile && yarn encore production
## Copy built assets to primary image
FROM dunglas/frankenphp:1-php8.3
COPY --from=assets /app/public/build /app/public/build |
i tried to install webpack and npm, but i can't seem to install them. i always get the error
npm: not found
this is my Dockerfile
The text was updated successfully, but these errors were encountered: