get-file-information
Version:
提供获取文件信息,图片/视频,宽高,大小,Md5,视频时长等
23 lines (21 loc) • 516 B
JavaScript
// 引入nodejs path 包
const path = require('path');
const { resolve } = require('path');
module.exports = {
watchOptions: {
ignored: /node_modules/,
},
// 入口文件
entry: './src/index.js',
// 输出打包文件配置
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'getFileInfo.js',
library: 'getFileInfo', // 对外暴露对象名称
libraryTarget: 'umd',
clean: true
},
// 打包环境
mode: 'production',
// 开启source-map 方便生成调试。
};