webpack-encore icon indicating copy to clipboard operation
webpack-encore copied to clipboard

Best way to include template theme in Webpack Encore ?

Open Cartman34 opened this issue 4 years ago • 1 comments

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

  1. 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 ?
  2. Put it in my known sources in a sub folder named vendor, install manually dependencies with yarn add pacakage and import the dependencies & theme.
  3. 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.

Cartman34 avatar Mar 20 '21 08:03 Cartman34

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar Dec 23 '24 12:12 carsonbot

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar Jun 24 '25 12:06 carsonbot

Friendly ping? Should this still be open? I will close if I don't hear anything.

carsonbot avatar Jul 08 '25 12:07 carsonbot

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!

carsonbot avatar Jul 22 '25 12:07 carsonbot