-
-
Notifications
You must be signed in to change notification settings - Fork 84
Multiple entrypoints, manifest.json, entrypoints.json and encore_entry_script_tags() #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey, Since Encore build produces Encore (or Encore-less webpack, or other bundlers) builds completely fit into the concept of asset packages. But it looks like for now, they are separated, and this is not very correct. Historically there were assets with their packages. Later Encore has appeared, and it has brought its own separate config with builds and other options. And now we have two concepts instead of, actually, one: packages and builds. And this gives us confusion. We have Or maybe everything currently is really as it should be? And is not subject of change in future version? P.S. I've found this comment as well: #17 (comment) Later @shulard answers that packages and builds are different things, but... Yes, now they are separated. But should they really be? This is really confusing now. |
Thank you for this issue. |
Friendly reminder that this issue exists. If I don't hear anything I'll close this. |
Hey. Let's close this |
Hi!
I am trying to use multiple Webpack configs in my
webpack.config.json
. Following this guide — https://symfony.com/doc/current/frontend/encore/advanced-config.html — I've specified all builds insidewebpack_encore.yaml
. And then I've tried to output my script(s) in my Twig template:But I've got the following error:
Okay... but there is nothing about that neither in the docs nor in the
webpack_encore.yaml
.After some digging I've found
assets.yaml
and that disablingassets.json_manifest_path
solves this issue and everything renders.But I am still not sure — I do everything correctly or not. Maybe I have to specify builds (which are named "packages") inside
assets.yaml
as well? And then:But... I have to repeat the same parameter twice for some reason. And I have to specify my Webpack builds in several config files (under different keys).
It looks absolutely unintuitive. And there is a lack of information in the documentation about this.
P.S. I've found this: https://symfony.com/doc/current/frontend/encore/versioning.html
I.e.
entrypoints.json
forencore_entry_script_tags()
, andmanifest.json
forasset()
? But I still do not understand whyencore_entry_script_tags()
needs both parameters. If we can disableassets.json_manifest_path
inassets.yaml
and everything seems to work without it why doesencore_entry_script_tags()
depend on both parameters? Why can't we makeencore_entry_script_tags()
andasset()
dependent on the same unified parameter?P.P.S. Honestly, in ideal world it would be great to specify builds only inside
webpack.config.json
and then just use them inencore_entry_script_tags()
without adding them manually in several configs.Summarizing:
Thank you! :)
The text was updated successfully, but these errors were encountered: