Open 6562680 opened 2 years ago
if you need to create 2 configs, that's what the Encore.reset()
is for.
thats what am talking about.
1) what about that encore wants to clear output directory starting building from second config? yes, we define something like:
.cleanupOutputBeforeBuild( [ '!**/*' ] )
2) also encore cant rename 'entrypoints.json', seems it should be two different build folders, otherwise config from one encore could change output of second one
.configureManifestPlugin( (options) => {
options.filename = 'manifest.json'; // can rename manifest. cant rename entrypoints. cant merge entrypoints. cant force symfony to use different entrypoints. cant twig get second entrypoints from symfony.
} )
Moral? Think first.
@6562680 the solution to me is to use separate output folders for your modern and legacy builds: public/build
and public/legacy-build
for instance. This way, you won't have file name conflicts
Yes, did it, actually build contains images and other shared things. Even if repository ignores any builds at least one required points - using "php encore code" to select from one manifest or two manifest, one entrypoints.json or second.
I had done it myself with raw php without symfony, cus of no twig extension, no symfony config for that, thank god am writing on raw php with those "recommendations" like "its fine, dont worry, get out"
Actually the problem is "create method "set" for sibling "add" - europeans again recommend to find "solution"... That brain is broken. 100th time that shit. They never think standart. They think like "solve here"
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
Always i've wroten setter i must create delete or clear method.
That should be solved via creating methods: setItems() + addItem()
Its a minimum. If you pass setItems([]) - it work like "delete". Then you add "addItems", "deleteItem", "deleteItems" if needed or skip that useless stuff.
Why "set" is needed? We see "Google Pagespeed" recommendation about "separate bundles for ES5 and ES2015+" - almost 50% filesize difference.
We need to create two bundles with two configs.
But ConfigValidator forbid you to .getWebpackConfig() without entries. You add "app" as entry, and next you need to create "app.es5" entry, but inside the list already "app". You cant delete it.
===
Also bug:
AND
There's no way to define: