bwdblogs

修改vue中的挂载页面(index.html)的路径

 版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/VegasLemon/article/details/88910013

vue中的挂载页面index.html路径是在webpack.dev.conf.js下配置的,

找到plugins下面的

  1.  
    new HtmlWebpackPlugin({
  2.  
    filename: \'index.html\',
  3.  
    template: \'index.html\',
  4.  
    inject: true
  5.  
    }),

以上便是挂载页面的配置,其中
filename是输出的文件名,默认是index.html
template是依赖的模板,修改这个就能改变挂载的模板路径

例如

  1.  
    new HtmlWebpackPlugin({
  2.  
    filename: \'index.html\',
  3.  
    template: \'src/index.html\',
  4.  
    inject: true
  5.  
    }),

以上配置将启用src下的index.html路径。

分类:

技术点:

相关文章:

  • 2022-02-03
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
  • 2021-06-05
  • 2022-12-23
相关资源
相似解决方案