2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Update dev dependencies (#3401)

- Everything still works as expected.
  - Remove bundlesize
    - It still uses libtorb which is deprecated and broken on Win and
      requires a full suite of build tools on Mac. Keeping it in the
      package makes it difficult for anyone filing issues to run tests.
    - See: #3396
  - Update grunt and it's plugins
  - Update karma to v4...so much faster!
    - Changed the karma config. Better changes: #3394
  - Update Webpack
    - Uses terser over uglify
  - Update eslint
    - Caused an error in util.js from the `global` directive so the
      directive is removed (it was not needed).
  - Update typescript
    - The old version of tsc didn't know about new features in
      @types/node (like `asserts value`).

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Daniel Lopretto
2020-12-16 03:25:06 -05:00
committed by GitHub
parent 8b0f373df0
commit 59ab559386
4 changed files with 36 additions and 70 deletions
+5 -20
View File
@@ -1,12 +1,13 @@
const TerserPlugin = require('terser-webpack-plugin');
var webpack = require('webpack');
var config = {};
function generateConfig(name) {
var uglify = name.indexOf('min') > -1;
var compress = name.indexOf('min') > -1;
var config = {
entry: './index.js',
output: {
path: 'dist/',
path: __dirname + '/dist/',
filename: name + '.js',
sourceMapFilename: name + '.map',
library: 'axios',
@@ -15,25 +16,9 @@ function generateConfig(name) {
node: {
process: false
},
devtool: 'source-map'
devtool: 'source-map',
mode: compress ? 'production' : 'development'
};
config.plugins = [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
})
];
if (uglify) {
config.plugins.push(
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
}
})
);
}
return config;
}