ctf0 / laravel-mix-versionhash

Auto append hash to file instead of using virtual one
MIT License
61 stars 18 forks source link

bugfix: correct manifest filenames when using library code splitting #18

Closed tpetry closed 5 years ago

tpetry commented 5 years ago

When using .versionHash() together with .extract() the filenames in the manifest file are prepended by /./ paths which is incorrect (#17).

The cause of the error seems to be that the webpack config for the output filename must be different when running with or without extract. The path is required for the normal operation of versionhash without extract, but when using extract the path must not be included.

ctf0 commented 5 years ago

many many thanx for the help, one question though

what happens when the path is used during the usage of .extract ?

should we add an exception or will the plugin automatically handle it itself ?

tpetry commented 5 years ago

Which path do you mean? Do you have an example so i can test it?

ctf0 commented 5 years ago

i meant this part

The path is required for the normal operation of versionhash without extract, but when using extract the path must not be included

tpetry commented 5 years ago

My bugfix autodetects whether the extract functionality is used or not because the webpackConfig.optimization.runtimeChunk will be set if code splitting is enabled. So the plugin will handle everything automatically, no exception required, not documentation enhancements required

ctf0 commented 5 years ago

awesome, thanx for the headsup

tpetry commented 5 years ago

Could you publish a new version to npm?

ctf0 commented 5 years ago

i totally forgot to do that, i will publish it today once i get home