Skip to content

Commit

Permalink
Merge pull request #194 from orochi-network/bug/fix_smart_contract_mo…
Browse files Browse the repository at this point in the history
…dule_resolver

Bug: Fix mapping esm cjs in package.json and remove umd
  • Loading branch information
magestrio authored Oct 14, 2024
2 parents 013dd68 + 0b7a335 commit 445d840
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 deletions.
11 changes: 9 additions & 2 deletions packages/smart-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zkdb/smart-contract",
"version": "1.1.4",
"version": "1.1.5",
"description": "",
"author": "",
"license": "Apache-2.0",
Expand All @@ -10,7 +10,14 @@
"zkdatabase"
],
"type": "module",
"main": "build/src/index.js",
"main": "build/src/index.cjs.js",
"module": "build/src/index.esm.js",
"exports": {
".": {
"import": "./build/src/index.esm.js",
"require": "./build/src/index.cjs.js"
}
},
"types": "build/src/index.d.ts",
"scripts": {
"build": "rm -rf ./build && rollup -c",
Expand Down
24 changes: 0 additions & 24 deletions packages/smart-contract/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,4 @@ export default [
typescript({ sourceMap: true, tsconfig: 'tsconfig.json' }),
],
},
{
input: 'src/index.ts',
output: {
entryFileNames: 'src/index.umd.js',
format: 'umd',
dir: 'build',
preserveModules: false, // If will build to a single index.js file if it 'false'
sourcemap: true,
name: '@zkdb/smart-contract',
},
plugins: [
commonjs(),
alias({
entries: [
{ find: '@', replacement: 'src' },
{ find: '@archive-node', replacement: 'src/archive-node' },
{ find: '@contracts', replacement: 'src/contracts' },
{ find: '@proof', replacement: 'src/proof' },
{ find: '@types', replacement: 'src/types' },
],
}),
typescript({ sourceMap: true, tsconfig: 'tsconfig.json' }),
],
},
];

0 comments on commit 445d840

Please sign in to comment.