Multiple assets emit different content to the same filename
See original GitHub issueBug report
What is the current behavior?
webpack shows a warning when rebuild:
Multiple assets emit different content to the same filename app.js.map
If the current behavior is a bug, please provide the steps to reproduce.
webpack.config.js
const path = require('path')
const webpack = require('webpack')
module.exports = {
mode: 'development',
entry: {
app: './entry.js'
},
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].js'
},
devtool: false,
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: '[name].js.map'
}),
new webpack.HotModuleReplacementPlugin() // !!!!!!! remove this line, the warning will not display
]
}
entry.js
console.log(`
modify this module, then webpack shows warning:
WARNING in Conflict: Multiple assets emit different content to the same filename app.js.map
`)
reproduction steps:
- use
SourceMapDevToolPluginandHotModuleReplacementPlugin(refer to webpack.config.js) npx webpack --watch- modify content of entry.js, then save
- webpack shows a warning:
Multiple assets emit different content to the same filename app.js.map
webpack doesn’t show this warning if i remove the line new webpack.HotModuleReplacementPlugin()
What is the expected behavior?
webpack should not show a warning
Other relevant information: webpack version: 4.41.0 Node.js version: v10.15.3 Operating System: win10
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:18 (6 by maintainers)
Top Results From Across the Web
Conflict: Multiple assets emit to the same filename
First of all, on your output , you are specifying the filename to app.js ... Multiple assets emit different content to the same...
Read more >JavaScript : Conflict: Multiple assets emit to the same filename
JavaScript : Conflict: Multiple assets emit to the same filename [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] JavaScript ...
Read more >Multiple assets emit different content to the same filename
Bug 2013416 - Multiple assets emit different content to the same filename. Summary: Multiple assets emit different content to the same filename ...
Read more >Multiple assets emit to the same filename bundle.js - Laracasts
when i try to run mocha using laravel mix it gives me this error Conflict: Multiple assets emit to the same filename bundle.js...
Read more >Multiple assets emit different content to the same filename
webpack --mode production assets by status 241 KiB [cached] 4 assets Entrypoint feature = feature.css feature.js 4 auxiliary assets orphan ...
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
@donotlb Please use
filename: '[file].map[query]'forSourceMapDevToolPlugin, you can’t use[name]because hmr emit updates for example usingapp.3d0af954e7d8c1e90af5.hot-update.jsfile and you have three assets before generating source maps:[name]isapp[name]isappthen you generate source maps using
[name].js.mapfor second asset and third asset you get two source maps with the same nameapp.js.mapPlease help to solve this warnings after angular 9 and primeng 9 migration
WARNING in ./src/assets/css/style.css Module Warning (from ./node_modules/postcss-loader/src/index.js): Warning
(146:3) start value has mixed support, consider using flex-start instead
WARNING in Conflict: Multiple assets emit different content to the same filename loading.gif
WARNING in Conflict: Multiple assets emit different content to the same filename password-meter.png