@@ -37,7 +37,8 @@ console.log('Bundling...');
3737 * ```
3838 */
3939const deps = {
40- 'node_modules/@graphql-mesh/serve-cli/index' : 'src/index.ts' ,
40+ 'node_modules/@graphql-hive/gateway/index' : 'src/index.ts' ,
41+ 'node_modules/@graphql-mesh/serve-cli/index' : '../serve-cli/index.ts' ,
4142 'node_modules/@graphql-mesh/serve-runtime/index' : '../serve-runtime/src/index.ts' ,
4243 'node_modules/@graphql-mesh/include/hooks' : '../include/src/hooks.ts' ,
4344 // default transports should be in the container
@@ -115,16 +116,19 @@ function packagejson() {
115116 name : 'packagejson' ,
116117 generateBundle ( _outputs , bundles ) {
117118 for ( const bundle of Object . values ( bundles ) . filter (
118- bundle => ! ! deps [ bundle . name ] && bundle . name . startsWith ( 'node_modules/' ) ,
119+ bundle =>
120+ ! ! deps [ bundle . name ] &&
121+ ( bundle . name . startsWith ( 'node_modules/' ) || bundle . name . startsWith ( 'node_modules\\' ) ) ,
119122 ) ) {
120123 const dir = path . dirname ( bundle . fileName ) ;
121- const bundledFile = path . basename ( bundle . fileName ) ;
124+ const bundledFile = path . basename ( bundle . fileName ) . replace ( / \\ / g , '/' ) ;
122125 const pkg = { type : 'module' } ;
123126 if ( bundledFile === 'index.mjs' ) {
124127 pkg . main = bundledFile ;
125128 } else {
129+ const mjsFile = path . basename ( bundle . fileName , '.mjs' ) . replace ( / \\ / g, '/' ) ;
126130 // if the bundled file is not "index", then it's an exports path (like with @graphql-mesh/include/hooks)
127- pkg . exports = { [ `./${ path . basename ( bundle . fileName , '.mjs' ) } ` ] : `./${ bundledFile } ` } ;
131+ pkg . exports = { [ `./${ mjsFile } ` ] : `./${ bundledFile } ` } ;
128132 }
129133 this . emitFile ( {
130134 type : 'asset' ,
0 commit comments