1 Star 0 Fork 0

zhgf / clipboard.js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
const pkg = require('./package.json');
const path = require('path');
const webpack = require('webpack');
const production = process.env.NODE_ENV === 'production' || false;
const banner = `clipboard.js v${pkg.version}
https://zenorocha.github.io/clipboard.js
Licensed MIT © Zeno Rocha`;
module.exports = {
entry: './src/clipboard.js',
output: {
filename: production ? 'clipboard.min.js' : 'clipboard.js',
path: path.resolve(__dirname, 'dist'),
library: 'ClipboardJS',
libraryTarget: 'umd'
},
module: {
rules: [
{test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}
]
},
plugins: production ? [
new webpack.optimize.UglifyJsPlugin({
beautify: false,
mangle: {
screw_ie8: true,
keep_fnames: true
},
compress: {
screw_ie8: true
},
comments: false
}),
new webpack.BannerPlugin({banner})
] : [
new webpack.BannerPlugin({banner})
]
};
JavaScript
1
https://gitee.com/zhgf01/clipboard.js.git
git@gitee.com:zhgf01/clipboard.js.git
zhgf01
clipboard.js
clipboard.js
master

搜索帮助