axios-axios/webpack.config.js
Parth Banathia 25a5669739
fix: removed unused imports (#4914)
Co-authored-by: parth0105pluang <98079965+parth0105pluang@users.noreply.github.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-09-28 20:57:06 +02:00

27 lines
573 B
JavaScript

var config = {};
function generateConfig(name) {
var compress = name.indexOf('min') > -1;
var config = {
entry: './index.js',
output: {
path: __dirname + '/dist/',
filename: name + '.js',
sourceMapFilename: name + '.map',
library: 'axios',
libraryTarget: 'umd',
globalObject: 'this'
},
node: false,
devtool: 'source-map',
mode: compress ? 'production' : 'development'
};
return config;
}
['axios', 'axios.min'].forEach(function (key) {
config[key] = generateConfig(key);
});
module.exports = config;