Category : webpack-encore

I have a project based on on symfony 5 and webpack-encore. I run multiple instances of the project in production, with different contents. I create a docker image and run many containers off the same image, setting the content via ENV variables that typically configure the database name. No .env.* files involved, just RAM-based ENV ..

Read more

I have symfony project with twitter bootstrap template (hardcoded assets in twig). I would like manage assets with Encore, but if encore process file, make module and next compilation magic. Is any way how to config Encore for only combine js, without compilation? Basic install Encore: https://symfony.com/doc/current/frontend/encore/installation.html …and my idea, in file app.js: include ‘1-file.js’; ..

Read more

I have something like this in JS file: const icon = require(‘path-to.svg’).default; div.innerHTML = icon; When I build my assets using default Webpack 5.6.0 with rule test: /.(svg)$/, loader: ‘raw-loader’ the result is awesome: <div><svg>…</svg></div> But when I use Symfony Webpack Encore (latest) with (and without too) rule, the result is: <div>path-to.svg</div> Only file name! ..

Read more