Skip to content

Commit

Permalink
fix: require from module's root returns an empty object. (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
madmonl-starkware authored Nov 14, 2023
1 parent 3e70f57 commit e141e88
Show file tree
Hide file tree
Showing 4 changed files with 566 additions and 1,466 deletions.
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
},
"license": "Apache-2.0",
"author": "StarkWare Industries Ltd.",
"main": "dist/index.js",
"types": "dist/types/src/js/index.d.ts",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
"types": "dist/types/index.d.ts",
"files": [
"dist",
"src/config",
Expand All @@ -32,7 +33,7 @@
],
"scripts": {
"prebuild": "npm run clean",
"build": "webpack --mode production",
"build": "vite build",
"clean": "rm -rf ./dist",
"dev": "webpack-dev-server --mode development",
"docs:generate": "typedoc",
Expand Down Expand Up @@ -82,13 +83,11 @@
"mocha": "^10.2.0",
"prettier": "^2.8.7",
"semantic-release": "^19.0.5",
"terser-webpack-plugin": "^5.3.9",
"ts-loader": "^9.4.4",
"ts-node": "^10.9.1",
"typedoc": "^0.23.16",
"typescript": "^4.8.4",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
"vite": "^4.5.0",
"vite-plugin-dts": "^3.6.3"
}
}
26 changes: 26 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {defineConfig} from 'vite';
import dts from 'vite-plugin-dts';

export default defineConfig({
plugins: [
dts({
insertTypesEntry: true,
outDir: 'dist/types'
})
],
build: {
lib: {
entry: 'src/js/index.ts',
name: '@starkware-industries/starkware-crypto-utils',
fileName: format => `index.${format}.js`,
formats: ['cjs', 'es']
},
rollupOptions: {
external: [],
output: {
exports: 'named',
dir: 'dist'
}
}
}
});
40 changes: 0 additions & 40 deletions webpack.config.js

This file was deleted.

Loading

0 comments on commit e141e88

Please sign in to comment.