vue-cli 里如何添加新的(.html)文件


想要新添加的.html文件生效得改 build/webpack.dev.conf.js文件的 plugins部分
 
module.exports = merge(baseWebpackConfig, { module: { loaders: utils.styleLoaders() }, // eval-source-map is faster for development devtool: '#eval-source-map', plugins: [ // https://github.com/glenjamin/webpack-hot-middleware#installation--usage new webpack.optimize.OccurenceOrderPlugin(), new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin(), // https://github.com/ampedandwired/html-webpack-plugin new HtmlWebpackPlugin({ filename: 'index.html', template: 'index.html', inject: true }), new HtmlWebpackPlugin({ filename: '另一个.html', template: '另一个模板.html', inject: true }) ] })


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM