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