unique-pay
Version:
微信支付、支付宝支付聚合SDK,支持内置对象调用、jsSdk 调用,支持 vuejs、script 引用
42 lines (40 loc) • 957 B
JavaScript
var path = require("path");
var webpack = require("webpack");
module.exports = {
entry: "./src/UniquePay.js",
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/',
filename: 'unique-pay.min.js'
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
]
},
devtool: '#eval-source-map'
};
if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map'
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
])
}