Skip to content

Commit

Permalink
fix: common package commonjs exports
Browse files Browse the repository at this point in the history
  • Loading branch information
aseerkt committed Aug 21, 2024
1 parent 6b793a7 commit 88ab55a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ec2-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ jobs:
uses: actions/download-artifact@v4
with:
name: mchat_build


- name: Install packages
run: pnpm i

- name: Restart application
run: pm2 restart mchat

Expand Down
15 changes: 15 additions & 0 deletions common/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
{
"name": "common",
"version": "1.0.0",
"scripts": {
"build": "tsc"
},
"dependencies": {
"drizzle-orm": "^0.31.2",
"socket.io": "^4.7.5"
},
"exports": {
"./tables": {
"import": "./tables/index.ts",
"types": "./tables/index.ts",
"require": "./dist/tables/index.js"
},
"./socket": {
"import": "./socket/index.ts",
"types": "./socket/index.ts",
"require": "./dist/socket/index.js"
}
}
}
13 changes: 13 additions & 0 deletions common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"include": ["socket", "tables"],
"compilerOptions": {
"target": "es6",
"module": "CommonJS",
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "dist",
"resolveJsonModule": true
}
}

0 comments on commit 88ab55a

Please sign in to comment.