Generated files on disk have different file hash than Webpack-reported assets #72285
Labels
bug
Issue was opened via the bug report template.
create-next-app
Related to our CLI tool for quickly starting a new Next.js application.
Link to the code that reproduces this issue
https://github.com/mauron85/nextjs-webpack-assets
To Reproduce
// next.config.js
Current vs. Expected behavior
When building a Next.js application, the assets listed by Webpack (such as those logged by plugins like FileListPlugin or available in Webpack stats) have different hashes in their filenames compared to the files actually written to the .next/static folder on disk. This creates a mismatch between the assets reported by Webpack and those available on disk after the build process completes, impacting other webpack plugins eg. bug like microsoft/azure-devops-symbols#253
The filenames for assets reported by Webpack should match those generated on disk in the .next/static folder, including any appended hash values for cache busting.
Provide environment information
Which area(s) are affected? (Select all that apply)
create-next-app
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
"The mismatch between filenames on disk and Webpack asset names is causing issues with other Webpack plugins. For instance, when using AzureDevOpsSymbolsPlugin, this discrepancy results in duplicated sourceMappingURL entries in production builds, rendering them unusable across all browsers."
The text was updated successfully, but these errors were encountered: