Is there a way to have webpack inject the output into the HTML instead of a separate file?
<html>
<head>
</head>
<body>
<script type="text/javascript">
// webpack puts the output here
</script>
</body>
</html>
Is there a way to have webpack inject the output into the HTML instead of a separate file?
<html>
<head>
</head>
<body>
<script type="text/javascript">
// webpack puts the output here
</script>
</body>
</html>
Share
Improve this question
asked Oct 17, 2018 at 1:20
Stephen GilboyStephen Gilboy
5,8352 gold badges33 silver badges41 bronze badges
1 Answer
Reset to default 4I had to use the html-webpack-inline-source-plugin
. https://github./DustinJackson/html-webpack-inline-source-plugin
plugins: [
new HtmlWebpackPlugin({
inlineSource: '.(js|css)$' // embed all javascript and css inline
}),
new HtmlWebpackInlineSourcePlugin()
]