如何将html中关于react的代码包装成一个文件然后再在html直接引用
webpack打包成js,然后在html中引用js就行,html预留要填充组件的元素,在react中render进去就好
谢谢,我试试!
试试用 html-webpack-plugin
html-webpack-plugin