axios-package
Version:
More advanced axios encapsulation methods
52 lines (49 loc) • 1.07 kB
JavaScript
var path = require('path')
module.exports = {
mode: 'production',
entry: ['./index.js'],
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'axios-package.min.js',
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
}
]
},
devServer: {
historyApiFallback: true,
noInfo: true,
overlay: true
},
performance: {
hints: false
},
devtool: 'source-map'
}
// if (process.env.NODE_ENV === 'production') {
// module.exports.devtool = false
// module.exports.plugins = (module.exports.plugins || []).concat([
// new webpack.DefinePlugin({
// 'process.env': {
// NODE_ENV: '"production"'
// }
// }),
// new webpack.optimize.UglifyJsPlugin({
// sourceMap: false,
// compress: {
// warnings: false
// }
// }),
// new webpack.LoaderOptionsPlugin({
// minimize: true
// })
// ])
// }