File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 "version" : " 1.5.0" ,
44 "description" : " React hook API for registering agent tools in React Native" ,
55 "type" : " module" ,
6- "main" : " ./dist/index.cjs " ,
6+ "main" : " ./dist/index.js " ,
77 "module" : " ./dist/index.js" ,
88 "types" : " ./dist/index.d.ts" ,
99 "files" : [
2626 "author" : " Szymon Chmal <szymon.chmal@callstack.com>" ,
2727 "license" : " MIT" ,
2828 "scripts" : {
29- "build" : " tsc -b tsconfig.lib.json" ,
29+ "build" : " vite build" ,
30+ "typecheck" : " tsc -p tsconfig.lib.json --noEmit" ,
3031 "clean" : " rm -rf dist"
3132 },
3233 "exports" : {
34+ "./package.json" : " ./package.json" ,
3335 "." : {
36+ "development" : " ./src/index.ts" ,
3437 "types" : " ./dist/index.d.ts" ,
3538 "import" : " ./dist/index.js" ,
36- "require" : " ./dist/index.js "
39+ "require" : " ./dist/index.cjs "
3740 }
3841 },
3942 "dependencies" : {
Original file line number Diff line number Diff line change 55 "rootDir" : " src" ,
66 "outDir" : " dist" ,
77 "tsBuildInfoFile" : " dist/tsconfig.lib.tsbuildinfo" ,
8- "declaration" : true ,
9- "declarationMap" : true ,
10- "composite" : true ,
11- "emitDeclarationOnly" : false ,
8+ "emitDeclarationOnly" : true ,
129 "forceConsistentCasingInFileNames" : true ,
13- "types" : [" node" ],
10+ "types" : [" node" , " vite/client " ],
1411 "lib" : [" dom" , " ES2022" ],
1512 "jsx" : " react-jsx" ,
16- "module" : " NodeNext" ,
17- "moduleResolution" : " NodeNext" ,
18- "target" : " ES2022"
13+ "esModuleInterop" : true
1914 },
2015 "include" : [" src/**/*.ts" , " src/**/*.tsx" ],
2116 "references" : [
Original file line number Diff line number Diff line change 11/// <reference types='vitest' />
22import { defineConfig } from 'vite' ;
3- import { resolve } from 'path' ;
3+ import path , { resolve } from 'node: path' ;
44import dts from 'vite-plugin-dts' ;
55
66export default defineConfig ( {
7+ root : __dirname ,
8+ cacheDir : '../../node_modules/.vite/agent-bridge' ,
9+ base : './' ,
710 plugins : [
811 dts ( {
9- tsconfigPath : './tsconfig.lib.json' ,
12+ entryRoot : 'src' ,
13+ tsconfigPath : path . join ( __dirname , 'tsconfig.lib.json' ) ,
14+ rollupTypes : true ,
1015 } ) ,
1116 ] ,
12- root : __dirname ,
13- cacheDir : '../../node_modules/.vite/agent-bridge' ,
14- base : './' ,
1517 build : {
18+ ssr : true ,
1619 lib : {
1720 entry : resolve ( __dirname , 'src/index.ts' ) ,
18- fileName : 'index' ,
19- formats : [ 'es' , 'cjs' ] ,
21+ formats : [ 'es' as const , 'cjs' as const ] ,
2022 } ,
2123 rollupOptions : {
2224 external : [ 'react' , '@rozenite/plugin-bridge' ] ,
2325 } ,
2426 } ,
27+ server : {
28+ port : 3000 ,
29+ open : true ,
30+ } ,
2531} ) ;
Original file line number Diff line number Diff line change 2525 "author" : " Szymon Chmal <szymon.chmal@callstack.com>" ,
2626 "license" : " MIT" ,
2727 "scripts" : {
28- "build" : " tsc -b tsconfig.lib.json" ,
28+ "build" : " vite build" ,
29+ "typecheck" : " tsc -p tsconfig.lib.json --noEmit" ,
2930 "clean" : " rm -rf dist"
3031 },
3132 "exports" : {
33+ "./package.json" : " ./package.json" ,
3234 "." : {
35+ "development" : " ./src/index.ts" ,
3336 "types" : " ./dist/index.d.ts" ,
3437 "import" : " ./dist/index.js" ,
35- "require" : " ./dist/index.js "
38+ "require" : " ./dist/index.cjs "
3639 }
3740 },
3841 "dependencies" : {
Original file line number Diff line number Diff line change 55 "rootDir" : " src" ,
66 "outDir" : " dist" ,
77 "tsBuildInfoFile" : " dist/tsconfig.lib.tsbuildinfo" ,
8- "declaration" : true ,
9- "declarationMap" : true ,
10- "composite" : true ,
11- "emitDeclarationOnly" : false ,
8+ "emitDeclarationOnly" : true ,
129 "forceConsistentCasingInFileNames" : true ,
13- "lib" : [" ES2022" ],
14- "module" : " NodeNext" ,
15- "moduleResolution" : " NodeNext" ,
16- "target" : " ES2022"
10+ "types" : [" node" , " vite/client" ],
11+ "esModuleInterop" : true
1712 },
1813 "include" : [" src/**/*.ts" ]
1914}
Original file line number Diff line number Diff line change 1+ /// <reference types='vitest' />
2+ import { defineConfig } from 'vite' ;
3+ import path , { resolve } from 'node:path' ;
4+ import dts from 'vite-plugin-dts' ;
5+
6+ export default defineConfig ( {
7+ root : __dirname ,
8+ cacheDir : '../../node_modules/.vite/agent-shared' ,
9+ base : './' ,
10+ plugins : [
11+ dts ( {
12+ entryRoot : 'src' ,
13+ tsconfigPath : path . join ( __dirname , 'tsconfig.lib.json' ) ,
14+ rollupTypes : true ,
15+ } ) ,
16+ ] ,
17+ build : {
18+ ssr : true ,
19+ lib : {
20+ entry : resolve ( __dirname , 'src/index.ts' ) ,
21+ formats : [ 'es' as const , 'cjs' as const ] ,
22+ } ,
23+ } ,
24+ server : {
25+ port : 3000 ,
26+ open : true ,
27+ } ,
28+ } ) ;
You can’t perform that action at this time.
0 commit comments