Open Lakrimou opened 10 months ago
I recommend trying this solution: https://github.com/dunglas/symfony-docker/issues/497#issuecomment-1783193487
In your Dockerfile add following lines
COPY package.json yarn.lock ./
RUN yarn install
COPY assets assets/
COPY webpack.config.js ./
RUN yarn build```
This works for me
Probably, better so switch to Symfony Asset Mapper (a replacement for Webpack Encore)
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 : https://github.com/dunglas/symfony-docker/issues/475#issuecomment-1947425264
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: Production, development and CI ready
.
The various proposed PRs have not received sufficient feedback or have not been followed up correctly by this author.
You can take up the subject again if you wish to see it in the project: https://github.com/dunglas/symfony-docker/pull/186 & https://github.com/dunglas/symfony-docker/pull/425 I'll be happy to review it
We'll probably push the user to use AssetMapper, see : #475 (comment)
Is there going to be much thought behind code bases that are older/heavily reliant on webpack? Kinda feels like we're just forcing an upgrade to users who may have large complex js thats not easy to unpack and port over to assetMapper
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.
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