File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Plugin , ResolvedConfig } from 'vite' ;
22import { CodegenContext , generate , loadContext } from '@graphql-codegen/cli' ;
3- import { createMatcher , isDocumentMatch , isGeneratedMatch } from './matchers' ;
3+ import { createMatcher , isDocumentMatch } from './matchers' ;
44
55export default function VitePluginGraphQLCodegen ( ) : Plugin {
66 let viteConfig : ResolvedConfig ;
@@ -28,9 +28,6 @@ export default function VitePluginGraphQLCodegen(): Plugin {
2828 const listener = async ( absolutePath = '' ) => {
2929 const matcher = createMatcher ( absolutePath , viteConfig ) ;
3030
31- const isGenerated = await isGeneratedMatch ( matcher , codegenContext ) ;
32- if ( isGenerated ) return ;
33-
3431 const isDocument = await isDocumentMatch ( matcher , codegenContext ) ;
3532 if ( ! isDocument ) return ;
3633
Original file line number Diff line number Diff line change @@ -3,10 +3,7 @@ import minimatch from 'minimatch';
33
44export type Matcher = ReturnType < typeof createMatcher > ;
55
6- export default function createMatcher (
7- absolutePath : string ,
8- config : ResolvedConfig
9- ) {
6+ export function createMatcher ( absolutePath : string , config : ResolvedConfig ) {
107 const getRelativePath = ( path : string ) => {
118 return path . split ( `${ config . root } /` ) . slice ( - 1 ) [ 0 ] ;
129 } ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- export { default as createMatcher } from './createMatcher' ;
1+ export * from './createMatcher' ;
22export * from './documents' ;
3- export * from './generated' ;
You can’t perform that action at this time.
0 commit comments