Webpack, html-webpack-plugin, Error: Child compilation failed

The problem is indeed the file-loader, because it simply copies the file over. By the time html-webpack-plugin tries to write index.html it has already been written by file-loader, hence resulting in a conflict. There are several ways to resolve that issue, depending on what your needs are. You could use html-loader for your HTML, although … Read more

How to load images through webpack when using HTMLWebpackPlugin?

I’m not a webpack expert, but i got it to work by doing this: <img src=”https://stackoverflow.com/questions/47126503/<%=require(“./src/assets/logo.png’)%>”> Plugin config new HtmlWebpackPlugin({ filename: ‘index.html’, template: ‘index.html’ }), According to the docs: https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md By default (if you don’t specify any loader in any way) a fallback lodash loader kicks in. The <%= %> signifies a lodash template Under … Read more

error code: 521