File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -591,7 +591,7 @@ You can also use the export `jsonSchemaBuilder` to get your own copy of the Grap
591591In node:
592592``` js
593593import {graphql } from ' graphql' ;
594- import {jsonSchemaBuilder } from ' json-graphql-server' ;
594+ import {jsonSchemaBuilder } from ' json-graphql-server/node ' ;
595595
596596const data = { };
597597const schema = jsonSchemaBuilder (data);
@@ -616,7 +616,7 @@ This uses the export `getPlainSchema`.
616616import { ApolloServer } from ' apollo-server' ;
617617import { makeExecutableSchema } from ' @graphql-tools/schema' ; // or graphql-tools
618618import { applyMiddleware } from ' graphql-middleware' ;
619- import { getPlainSchema } from ' json-graphql-server' ;
619+ import { getPlainSchema } from ' json-graphql-server/node ' ;
620620
621621const data = { };
622622
Original file line number Diff line number Diff line change 66 "module" : " ./dist/json-graphql-server.js" ,
77 "exports" : {
88 "." : {
9+ "types" : " ./dist/client.d.ts" ,
910 "import" : " ./dist/json-graphql-server.js" ,
1011 "require" : " ./dist/json-graphql-server.cjs"
1112 },
1213 "./node" : {
14+ "types" : " ./dist/node.d.ts" ,
1315 "import" : " ./dist/json-graphql-server-node.js" ,
1416 "require" : " ./dist/json-graphql-server-node.cjs"
1517 }
3436 "test" : " cross-env NODE_ENV=test vitest" ,
3537 "server" : " node ./bin/json-graphql-server.cjs example/data.cjs" ,
3638 "prepublish" : " yarn build" ,
37- "build" : " yarn build-ts && yarn build-esm-cjs && yarn build-node && yarn build-umd " ,
39+ "build" : " yarn build-esm-cjs && yarn build-node && yarn build-umd && yarn build-ts " ,
3840 "build-ts" : " tsc" ,
3941 "build-esm-cjs" : " vite build" ,
4042 "build-node" : " vite build -c ./vite.config.node.js" ,
Original file line number Diff line number Diff line change 1212 "resolveJsonModule" : true ,
1313 "isolatedModules" : true ,
1414 "moduleDetection" : " force" ,
15- "noEmit" : true ,
15+ "emitDeclarationOnly" : true ,
16+ "declaration" : true ,
17+ "declarationMap" : true ,
18+ "outDir" : " ./dist" ,
1619
1720 /* Linting */
1821 "strict" : true ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export default defineConfig({
1111 entry : resolve ( __dirname , 'src/client.ts' ) ,
1212 name : 'JsonGraphqlServer' ,
1313 formats : [ 'es' , 'cjs' ] ,
14+ fileName : 'json-graphql-server' ,
1415 } ,
1516 sourcemap : true ,
1617 minify : process . env . NODE_ENV === 'production' ,
You can’t perform that action at this time.
0 commit comments