No Parsed/Gziped sizes if there is build hash in output path
See original GitHub issueIssue 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found out that
loader-utils
has a function to maybe resolve this problem:interpolateName
https://github.com/webpack/loader-utils#interpolatenameSadly I’m not the pro webpack user, who can find the right line to edit.
Sure, there you go https://github.com/martinkadlec0/wba-build-hash