Files
weRequest/webpack.config.js
TENCENT\ivinwu 103647984e 1.1.0
2018-12-19 19:26:38 +08:00

35 lines
872 B
JavaScript

let path = require('path');
let webpack = require('webpack');
let pk = require('./package.json');
module.exports = [{
mode: 'production',
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/index.js',
output: {
path: path.join(__dirname, 'build'),
filename: 'weRequest.js',
library: "weRequest",
libraryTarget: "commonjs-module"
},
devtool: 'inline-source-map',
plugins: [
new webpack.BannerPlugin({
banner: `weRequest ${pk.version}\n${pk.homepage}`
})
]
}]