Skip to content
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

Output always includes hash since 7.1 #395

Open
DysphoricUnicorn opened this issue Apr 28, 2021 · 1 comment
Open

Output always includes hash since 7.1 #395

DysphoricUnicorn opened this issue Apr 28, 2021 · 1 comment
Labels

Comments

@DysphoricUnicorn
Copy link

DysphoricUnicorn commented Apr 28, 2021

Describe the bug

Because Webpack will use way too much memory when it's left watching files during a whole workday if the output files include a hash in their name, we set it up to only include the hash on production.

This worked fine, however since version 7.1, the output paths will always include a hash, even if the actual files do not.

To Reproduce

This config works fine in 7.0 but breaks in 7.1

output: {
            path: path.join(__dirname, '..', 'static', 'js'),
            publicPath: '/static/js',
            filename: isDevelopment ? 'webapp.[name].js' : 'webapp.[contenthash].js',
        },

Since 7.1, the output will always look like:

{"main":{"js":"./static/js/webapp.[$hash].js"}}

Expected behavior
The output only contains hashes if the file it's referring to does as well.

It should look something like:

{"main":{"js":"./static/js/webapp.main.js"}}

Desktop (please complete the following information):

  • OS: Linux / Docker
  • Node version: 12
  • Plugin version: 7.1.0
@DysphoricUnicorn DysphoricUnicorn changed the title Output always includes hash since 6.1 Output always includes hash since 7.1 Apr 28, 2021
@ztoben ztoben added the bug label Apr 28, 2021
@ztoben
Copy link
Owner

ztoben commented Apr 28, 2021

Thanks for the report, I'll take a look when I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants