webpack-encore
webpack-encore copied to clipboard
Best way to include template theme in Webpack Encore ?
Hello,
I bought several template themes and both are coming with their dependencies & images... Some of theme even include a package.json file.
So now, what is the best way to include them in my project ?
Here are my known choices
- Include their CSS/JS directly in my twig template. But what about dependencies ? Should I use a separate webpack entry to insert before the theme ressources ?
- Put it in my known sources in a sub folder named vendor, install manually dependencies with
yarn add pacakageand import the dependencies & theme. - Put it outside assets folder and yarn add the theme folder
yarn add file:local/packages/theme/
In all case, template only handle a color variable, I have to override css properties in my own sources.
For cases 2 & 3, I am getting issues with images in CSS URL() & first yarn watch is very long. Should I use a separate webpack entry for theme ?
For case 1, handling dependencies is really hard.
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Friendly ping? Should this still be open? I will close if I don't hear anything.
Hey,
I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!