0.0.9 • Published 5 years ago
adapter-arthurci-plugin v0.0.9
adapter-arthurci-plugin
Install
npm install --save-dev adapter-arthurci-pluginUsage
const HtmlWebpackPlugin = require('html-webpack-plugin');
const AdapterArthurCIPlugin = require('./adapter-arthurci-plugin')
module.exports = {
  entry: {
    index: "./index.ts",
    index_head: "./index.css" // add "_head" at the end to inject in head.
  },
  output: {
    path: "./dist",
    filename: "[name].bundle.js"
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: "./index.html",
      filename: "./dist/index.html",
      chunks: ["index", "index_head"]
    }),
    new AdapterArthurCIPlugin(options)
  ]
}Options
| name | type | required | description | 
|---|---|---|---|
| path | {string} | true | 静态文件路径 | 
| templates | {array} | false | 指定需要处理的模板(undefined 默认全部处理) | 
| deleteOrigin | {boolean} | false | 是否删除原文件 |