This commit is contained in:
TENCENT\ivinwu
2018-12-19 19:26:38 +08:00
parent a7ee72b26c
commit 103647984e
25 changed files with 1672 additions and 1275 deletions

View File

@@ -1,22 +1,34 @@
var path = require('path');
let path = require('path');
let webpack = require('webpack');
let pk = require('./package.json');
module.exports = [{
mode: 'production',
entry: './src/weRequest.js',
entry: './src/index.js',
output: {
path: path.join(__dirname, 'build'),
filename: 'weRequest.min.js',
library: "weRequest",
libraryTarget: "commonjs-module"
},
plugins: [
new webpack.BannerPlugin({
banner: `weRequest ${pk.version}\n${pk.homepage}`
})
]
}, {
mode: 'development',
entry: './src/weRequest.js',
entry: './src/index.js',
output: {
path: path.join(__dirname, 'build'),
filename: 'weRequest.js',
library: "weRequest",
libraryTarget: "commonjs-module"
},
devtool: 'inline-source-map'
devtool: 'inline-source-map',
plugins: [
new webpack.BannerPlugin({
banner: `weRequest ${pk.version}\n${pk.homepage}`
})
]
}]