Open thomaskanzig opened 4 years ago
manifest.json
is the naming map. You can parse it to get the versioned file path.
Or, you can force disable the versioning by Encore.enableVersioning(false)
. But in that case, you may suffer from browser's caching mechanism.
Hey @thomaskanzig,
It depends on the content of your webpack.config.js
:)
Using enableVersioning() | Using splitEntryChunks() | How to |
---|---|---|
No | No | Nothing needed, you can directly call generated assets using their name |
Yes | No | You'll need to write some code that reads the manifest.json file to retrieve the generated names |
Yes or No | Yes | You'll need to write some code that reads the entrypoints.json file to retrieve which file(s) should be added for a given entrypoint |
Note that if you call enableSingleRuntimeChunk()
you'll also need to add the generated runtime.js
file (that can also be versioned) to your page(s).
Hi guys,
I have add
@symfony/webpack-encore
but I don't use Symfony. I just a normally project with PHP pure. I define too my config filewebpack.config.js
in my root path with all necessary settings.The question is how can I access the output files in my html ou php file?
...and become
main.5660ea39.js
with a posfix hash and I can't define a fix url in my<head>
.Help please.