MCPcopy
hub / github.com/axios/axios / generateConfig

Function generateConfig

webpack.config.js:3–20  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1var config = {};
2
3function generateConfig(name) {
4 var compress = name.indexOf('min') > -1;
5 var config = {
6 entry: './index.js',
7 output: {
8 path: __dirname + '/dist/',
9 filename: name + '.js',
10 sourceMapFilename: name + '.map',
11 library: 'axios',
12 libraryTarget: 'umd',
13 globalObject: 'this',
14 },
15 node: false,
16 devtool: 'source-map',
17 mode: compress ? 'production' : 'development',
18 };
19 return config;
20}
21
22['axios', 'axios.min'].forEach(function (key) {
23 config[key] = generateConfig(key);

Callers 1

webpack.config.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected