Skip to content

Commit

Permalink
add cjs version of the bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
suren-atoyan committed Dec 28, 2022
1 parent 4caa427 commit 3017aed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"javascript",
"webassembly"
],
"main": "./dist/x-python.umd.cjs",
"main": "./dist/x-python.cjs",
"module": "./dist/x-python.js",
"unpkg": "./dist/x-python.umd.cjs",
"jsdelivr": "./dist/x-python.umd.cjs",
Expand Down Expand Up @@ -47,7 +47,7 @@
"exports": {
".": {
"import": "./dist/x-python.js",
"require": "./dist/x-python.umd.cjs"
"require": "./dist/x-python.cjs"
}
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ export default defineConfig({
],
build: {
lib: {
formats: ['cjs', 'es', 'umd'],
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/main.ts'),
name: '@x-python/core',
name: 'xPython',
fileName: 'x-python',
},
rollupOptions: {
Expand Down

0 comments on commit 3017aed

Please sign in to comment.