Skip to content

Commit

Permalink
fix: commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
hxg2050 committed Apr 3, 2024
1 parent a9c79b6 commit 59c6d55
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 30 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@
"rollup": "^3.29.1",
"tslib": "^2.6.2",
"typescript": "^5.2.2"
},
"dependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3"
}
}
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@feiyun/client",
"repository": "https://github.com/hxg2050/feiyun.git",
"version": "0.0.6",
"version": "0.0.7",
"private": false,
"type": "module",
"main": "./src/index.ts",
Expand All @@ -23,7 +23,7 @@
},
"dependencies": {
"eventemitter3": "^5.0.1",
"queue": "^6.0.2",
"queue": "^7.0.0",
"ws": "^8.14.1"
}
}
19 changes: 17 additions & 2 deletions packages/client/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
import config from '../../rollup.config.mjs'
export default config;
import commonjs from '@rollup/plugin-commonjs';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript'
import { defineConfig } from 'rollup'

export default defineConfig({
input: 'src/index.ts',
output: [{
file: 'dist/index.cjs',
format: 'cjs',
}, {
file: 'dist/index.mjs',
format: 'esm',
}],
external: ['eventemitter3'],
plugins: [typescript(), commonjs(), nodeResolve()],
})
2 changes: 1 addition & 1 deletion packages/feiyun/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "feiyun",
"repository": "https://github.com/hxg2050/feiyun.git",
"version": "0.2.12",
"version": "0.2.13",
"private": false,
"type": "module",
"main": "./src/index.ts",
Expand Down
121 changes: 96 additions & 25 deletions pnpm-lock.yaml

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

0 comments on commit 59c6d55

Please sign in to comment.