mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Fixed missed minified builds; (#4805)
* Fixed missed minified builds; Refactored utils.js; Refactored `utils.isStandardBrowserEnv()` as a `platform/browser` property; Added builds size log; * Replaced `rollup-plugin-filesize` with `rollup-plugin-bundle-size`; Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
+3
-1
@@ -4,6 +4,7 @@ import {terser} from "rollup-plugin-terser";
|
||||
import json from '@rollup/plugin-json';
|
||||
import { babel } from '@rollup/plugin-babel';
|
||||
import autoExternal from 'rollup-plugin-auto-external';
|
||||
import bundleSize from 'rollup-plugin-bundle-size'
|
||||
|
||||
const lib = require("./package.json");
|
||||
const outputFileName = 'axios';
|
||||
@@ -24,6 +25,7 @@ const buildConfig = ({es5, browser = true, minifiedVersion = true, ...config}) =
|
||||
resolve({browser}),
|
||||
commonjs(),
|
||||
minified && terser(),
|
||||
minified && bundleSize(),
|
||||
...(es5 ? [babel({
|
||||
babelHelpers: 'bundled',
|
||||
presets: ['@babel/preset-env']
|
||||
@@ -37,7 +39,7 @@ const buildConfig = ({es5, browser = true, minifiedVersion = true, ...config}) =
|
||||
];
|
||||
|
||||
if (minifiedVersion) {
|
||||
build({minified: true})
|
||||
configs.push(build({minified: true}))
|
||||
}
|
||||
|
||||
return configs;
|
||||
|
||||
Reference in New Issue
Block a user