Skip to content

Commit

Permalink
Linking to type from ./shared folder in react-sdk dist (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
byn9826 authored Feb 9, 2025
1 parent dab232c commit 32979fc
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 44 deletions.
20 changes: 10 additions & 10 deletions admin-panel/package-lock.json

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

2 changes: 1 addition & 1 deletion admin-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@heroicons/react": "^2.1.4",
"@melody-auth/react": "^0.0.10",
"@melody-auth/react": "^0.0.11",
"@preact/signals-react": "^2.1.0",
"@reduxjs/toolkit": "^2.2.7",
"class-validator": "^0.14.1",
Expand Down
47 changes: 19 additions & 28 deletions package-lock.json

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

9 changes: 5 additions & 4 deletions react-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@melody-auth/react",
"version": "0.0.10",
"version": "0.0.11",
"main": "dist/index.js",
"repository": {
"type": "git",
Expand All @@ -11,18 +11,19 @@
"access": "public"
},
"devDependencies": {
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"react": "^18.2.0",
"rollup": "^4.19.2"
"rollup": "^4.19.2",
"tsc-alias": "^1.8.10"
},
"peerDependencies": {
"react": "^16.11.0 || ^17 || ^18"
},
"scripts": {
"build": "rm -rf ./dist && mkdir ./dist && mkdir ./dist/shared && mkdir ./dist/web-sdk && cp -r ../shared/dist/* ./dist/shared && cp -r ../web-sdk/dist/* ./dist/web-sdk && rollup -c --bundleConfigAsCjs",
"build": "rm -rf ./dist && mkdir ./dist && mkdir ./dist/shared && mkdir ./dist/web-sdk && cp -r ../shared/dist/* ./dist/shared && cp -r ../web-sdk/dist/* ./dist/web-sdk && rollup -c --bundleConfigAsCjs && tsc-alias",
"type:check": "tsc --noEmit"
}
}
2 changes: 1 addition & 1 deletion react-sdk/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
entries: [
{ find: 'shared', replacement: path.resolve(__dirname, 'dist/shared') },
{ find: 'web-sdk', replacement: path.resolve(__dirname, 'dist/web-sdk') }
]
],
}),
resolve(),
commonjs(),
Expand Down
3 changes: 3 additions & 0 deletions react-sdk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"module": "ESNext",
"rootDir": "src",
"outDir": "./dist",
"paths": {
"shared": ["./shared"]
}
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules"]
Expand Down

0 comments on commit 32979fc

Please sign in to comment.