question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No Parsed/Gziped sizes if there is build hash in output path

See original GitHub issue

Issue description

If there as build hash in webpack’s output path, I get following error from WBA: Error parsing bundle asset "/xxx/app/dist/[hash]/app.js": no such file.

My webpack output config:

	output: {
		filename: '[name].js',
		path: path.join(__dirname, './dist/[hash]/'),
		publicPath: `${cdnPublicPath}[hash]/`,
		chunkFilename: '[name].js',
	},

This causes that there is no gziped/parsed size on the WBA page.

Technical info

  • Webpack Bundle Analyzer version: 3.3.2
  • Webpack version: 4.35.0
  • Node.js version: 10.13
  • npm/yarn version: npm 6.9
  • OS: Mac OS Mojave

Debug info

How do you use this module? As CLI utility or as plugin? Plugin

If plugin, what options were provided? (e.g. new BundleAnalyzerPlugin({ analyzerMode: 'disabled', generateStatsFile: true })) No options

What other Webpack plugins were used? webpack.DefinePlugin CircularDependencyPlugin FlowStatusWebpackPlugin ExtractCssChunks HtmlWebpackPlugin SpriteLoaderPlugin

Demo repo

https://github.com/martinkadlec0/wba-build-hash

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Sysixcommented, Jun 10, 2021

I found out that loader-utils has a function to maybe resolve this problem: interpolateName https://github.com/webpack/loader-utils#interpolatename

Sadly I’m not the pro webpack user, who can find the right line to edit.

1reaction
martinkadlec0commented, Jul 30, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Use chunkhash only for some output files in webpack
Now, I want to have the loader to not have a chunkhash in its filename but the bundle should have the chunkhash. Possible?...
Read more >
hashlib — Secure hashes and message digests ... - Python Docs
For example: use sha256() to create a SHA-256 hash object. ... objects with different digest sizes have completely different outputs (shorter hashes are...
Read more >
Properties of a cryptographically secure and useful hash ...
It is a function that takes arbitrary-sized data and maps it to a fixed-size ... and then recompute the hash to check if...
Read more >
Adding Hashes to Filenames - SurviveJS
If you are using webpack 4, be careful with contenthash as it's not fully reliable. ... const config = { output: { path:...
Read more >
NCCIC ICS Fact Sheet - File Hashing - CISA
of inputs with a finite-sized signature; when two inputs result in the same output, this is called a hash collision. Algorithms that produce...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found