diff --git a/packages/cryptography/Taskfile.yml b/packages/cryptography/Taskfile.yml index 9cc175960..596c0277f 100644 --- a/packages/cryptography/Taskfile.yml +++ b/packages/cryptography/Taskfile.yml @@ -28,6 +28,7 @@ tasks: - task: format - task: lint - npx babel src -d lib --out-file-extension .cjs > /dev/null + - npx rollup -c > /dev/null - npx yalc publish > /dev/null clean: diff --git a/packages/cryptography/package.json b/packages/cryptography/package.json index c17efeb0f..531a08e3b 100644 --- a/packages/cryptography/package.json +++ b/packages/cryptography/package.json @@ -32,7 +32,7 @@ "exports": { "./package.json": "./package.json", ".": { - "import": "./src/index.js", + "import": "./lib/index.js", "require": "./lib/index.cjs" } }, @@ -41,6 +41,7 @@ "repository": "https://github.com/hashgraph/hedera-sdk-js", "bugs": "https://github.com/hashgraph/hedera-sdk-js/issues", "type": "module", + "sideEffects": false, "keywords": [ "hedera", "hashgraph", diff --git a/packages/cryptography/rollup.config.js b/packages/cryptography/rollup.config.js new file mode 100644 index 000000000..a2f6686e1 --- /dev/null +++ b/packages/cryptography/rollup.config.js @@ -0,0 +1,14 @@ +import terser from "@rollup/plugin-terser"; + +export default [ + { + input: "src/index.js", + output: { + dir: "lib/", + format: "esm", + sourcemap: true, + preserveModules: true, + plugins: [terser()], + }, + }, +];