Skip to content

Commit

Permalink
clear logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Oct 12, 2023
1 parent 9841fb4 commit e2fcbf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
19 changes: 4 additions & 15 deletions packages/houdini/src/lib/router/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export function internalRoutes(config: ConfigFile): string[] {
export async function buildLocalSchema(config: Config): Promise<void> {
// before we build the local schcema, we need to generate the typescript config file
// so that we can resolve all of the necessary imports
console.log('building local schema')

// load the current version of vite
const { build } = await import('vite')
Expand All @@ -47,26 +46,16 @@ export async function buildLocalSchema(config: Config): Promise<void> {
},
})

console.log('done building local schema')

process.env.HOUDINI_SECONDARY_BUILD = 'false'
}

export async function loadLocalSchema(config: Config): Promise<graphql.GraphQLSchema> {
await buildLocalSchema(config)

console.log('after schema build')

// import the schema we just built
try {
const { default: schema } = await import(
path.join(config.rootDir, 'temp', 'assets', 'schema.js')
)
console.log('after schema import')
const { default: schema } = await import(
path.join(config.rootDir, 'temp', 'assets', 'schema.js')
)

return schema
} catch (e) {
console.log(e)
throw e
}
return schema
}
5 changes: 0 additions & 5 deletions packages/houdini/src/vite/houdini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,13 @@ export default function Plugin(opts: PluginConfig = {}): VitePlugin {
})
}

console.log('build start', { devServer, isSecondaryBuild: isSecondaryBuild() })

// we need to generate the runtime if we are building in production
if (!devServer && !isSecondaryBuild()) {
// make sure we have an up-to-date schema
if (config.localSchema && !config.schema) {
console.log('loading here')
config.schema = await loadLocalSchema(config)
console.log('after schema load')
}

console.log('generating runtime')
// run the codegen
try {
await generate(config)
Expand Down

0 comments on commit e2fcbf4

Please sign in to comment.