The index.html file of vue will contain a mounted node, which is <p id='app'> </p>
, but if I use html -webpack-plugin
, the generated html
file does not contain the <p id='app'> </p>
mount point, see I haven't found a solution in the plug-in's documentation. How should I do it?
html-webpack-plugin has a
template
属性,可以指定一个你自己需要的html
template, the usage is as follows:Then this
index.html_vm
can look like this:You need to hang it on the original index.html bar. Webpack is not specifically used for vue. htmlWebpackPlugin only helps you process index.html and hang the packaged script. The dom structure inside will not be automatically generated for you. of.
The mount node is replaced instead of appended to the content