zoukankan      html  css  js  c++  java
  • webpack 打包html文件

    1、安装webpack-html-plugin模块

    $ npm install webpack-html-plugin —save-dev

    2webpack.config.js文件写入

    var WebpackHtmlPlugin = require(‘webpack-html-plugin');

    output: {

        path: path.resolve(__dirname, './dist'),

        publicPath: '/dist/',

        filename: '[name].js'

      },

      plugins: [

        new WebpackHtmlPlugin({

          template:'forgetPass.html',

          filename:'forgetPass.html'

        }),

        new WebpackHtmlPlugin({

          template:’app/utils/crawTask/crawTaskProcess/websiteRange/failSheet.html’,

          filename:'utils/crawTask/crawTaskProcess/websiteRange/failSheet.html'

        })

      ]

     

    码文不易,谢谢打赏

    码文不易,谢谢打赏

  • 相关阅读:
    Python Day13:开放封闭原则、函数装饰器、全局局部变量
    Python Day12
    Python Day11
    Python Day10
    drf框架
    drf框架
    drf框架
    drf框架
    vue框架
    vue框架
  • 原文地址:https://www.cnblogs.com/respect2017/p/7238975.html
Copyright © 2011-2022 走看看