File: update-rollup-plugins.patch

package info (click to toggle)
node-axios 1.2.1%2Bdfsg-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,796 kB
  • sloc: javascript: 10,727; makefile: 5
file content (44 lines) | stat: -rw-r--r-- 1,193 bytes parent folder | download
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
Description: update rollup plugins
Author: Yadd <yadd@debian.org>
Forwarded: no
Last-Update: 2022-11-29

--- a/rollup.config.js
+++ b/rollup.config.js
@@ -1,13 +1,13 @@
-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 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';
@@ -30,7 +30,7 @@
     },
     plugins: [
       json(),
-      resolve({browser}),
+      nodeResolve({browser}),
       commonjs(),
       minified && terser(),
       minified && bundleSize(),
@@ -108,8 +108,8 @@
         banner
       },
       plugins: [
-        autoExternal(),
-        resolve(),
+        json(),
+        nodeResolve(),
         commonjs()
       ]
     }