summaryrefslogtreecommitdiffstats
path: root/third_party/js/PKI.js/make-esmodule-bundle.patch
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/js/PKI.js/make-esmodule-bundle.patch')
-rw-r--r--third_party/js/PKI.js/make-esmodule-bundle.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/third_party/js/PKI.js/make-esmodule-bundle.patch b/third_party/js/PKI.js/make-esmodule-bundle.patch
new file mode 100644
index 0000000000..3f0641b91e
--- /dev/null
+++ b/third_party/js/PKI.js/make-esmodule-bundle.patch
@@ -0,0 +1,70 @@
+diff --git a/rollup.config.js b/rollup.config.js
+index 8c8a7c2..b6e61c0 100644
+--- a/rollup.config.js
++++ b/rollup.config.js
+@@ -3,6 +3,7 @@ import fs from "fs";
+ import typescript from "rollup-plugin-typescript2";
+ import dts from "rollup-plugin-dts";
+ import pkg from "./package.json";
++import { nodeResolve } from '@rollup/plugin-node-resolve';
+
+ const LICENSE = fs.readFileSync("LICENSE", { encoding: "utf-8" });
+ const banner = [
+@@ -12,7 +13,6 @@ const banner = [
+ "",
+ ].join("\n");
+ const input = "src/index.ts";
+-const external = Object.keys(pkg.dependencies || {});
+
+ export default [
+ {
+@@ -26,10 +26,10 @@ export default [
+ module: "ES2015",
+ removeComments: true,
+ }
+- }
++ },
+ }),
++ nodeResolve(),
+ ],
+- external: [...external],
+ output: [
+ {
+ banner,
+@@ -45,7 +45,6 @@ export default [
+ },
+ {
+ input,
+- external: [...external],
+ plugins: [
+ dts({
+ tsconfig: path.resolve(__dirname, "./tsconfig.json")
+@@ -58,4 +57,4 @@ export default [
+ }
+ ]
+ },
+-];
+\ No newline at end of file
++];
+diff --git a/tsconfig.json b/tsconfig.json
+index ffd67ec..e72bdb6 100644
+--- a/tsconfig.json
++++ b/tsconfig.json
+@@ -1,7 +1,8 @@
+ {
+ "compilerOptions": {
+- "target": "ES2019",
+- "module": "CommonJS",
++ "target": "ES6",
++ "module": "ES6",
++ "moduleResolution": "node",
+ "strict": true,
+ "importHelpers": true,
+ "noImplicitOverride": true,
+@@ -11,4 +12,4 @@
+ "exclude": [
+ "build/*.ts"
+ ]
+-}
+\ No newline at end of file
++}