1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
Description: update rollup plugins
Author: Yadd <yadd@debian.org>
Forwarded: no
Last-Update: 2024-08-13
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -1,14 +1,14 @@
-import resolve from '@rollup/plugin-node-resolve';
+import {nodeResolve} from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
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';
import aliasPlugin from '@rollup/plugin-alias';
import path from 'path';
+import fs from 'fs';
-const lib = require("./package.json");
+const lib = JSON.parse(fs.readFileSync("./package.json"));
const outputFileName = 'axios';
const name = "axios";
const namedInput = './index.js';
@@ -34,7 +34,7 @@
entries: alias || []
}),
json(),
- resolve({browser}),
+ nodeResolve({browser}),
commonjs(),
minified && terser(),
@@ -128,8 +128,8 @@
banner
},
plugins: [
- autoExternal(),
- resolve(),
+ json(),
+ nodeResolve(),
commonjs()
]
}
|