본문 바로가기
node/webpack

ERROR in Conflict: Multiple assets emit different content to the same filename index.html

by 새로운 도전을 위한 한걸음 2023. 7. 12.

에러 내용. 

ERROR in Conflict: Multiple assets emit different content to the same filename index.html

해결 방법 

아래와 같이 다중으로 HtmlWebpackPlugin 을 설정했는지 확인 template를 아래와 같이 설정할경우 에러 발생. 

다중으로 설정시 template 영역을 똑같이 셋팅해주면 에러 발생안함. 

new HtmlWebpackPlugin({
  inject: true,
})


new HtmlWebpackPlugin({
  inject: true,
  template: 'src/index.html'
}),