1.0.3 • Published 4 years ago

autox-header-webpack-plugin v1.0.3

Weekly downloads
489
License
ISC
Repository
github
Last release
4 years ago

autox-header-webpack-plugin

描述:

在打包后的文件中加入标识头,注释,选项:jsjiami.com.v6加密,base64编码

参数:

参数名参数类型参数作用
base64Boolean是否开启base64编码
advancedEnginesBoolean是否开启加密
header添加到文件开头的注释你可以直接使用fs.readFileSync(headerFile, "utf8").trim()读取txt文件

安装插件

npm install autox-header-webpack-plugin -D

使用插件

//path txt文件路径
const headerFile = path.resolve(__dirname, path);
const headerText = fs.readFileSync(headerFile, "utf8").trim();
const AutoxHeaderWebpackPlugin = require("autox-header-webpack-plugin");

//在webpack插件中添加
    plugins: [
 new AutoxHeaderWebpackPlugin({
        base64: true,
        advancedEngines: true,
        header: headerText
      }),
    ]
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago