Html Webpack plugin injects a index.html file for you with a div element containing an ID of “app”. Did you happen to be using a separate index.html file?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't know if it's because I was using npm but I was receiving the error
Uncaught Error: Target container is not a DOM element.
Once I removed the lines
"plugins: [
new HtmlWebpackPlugin({
inject: false,
template: HtmlWebpackTemplate,
appMountId: 'app',
}),
],"
from my webpack.config.js file this solution worked pefectly
Easiest solution on the internet in 2019.
Although the line "yarn add react react-dom" could be a little bit more visible
Html Webpack plugin injects a index.html file for you with a div element containing an ID of “app”. Did you happen to be using a separate index.html file?