Skip to content

Commit 2b8ff67

Browse files
committed
fix: get deploy preview working, fix types
1 parent 9fd2682 commit 2b8ff67

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

examples/graphiql-webpack/src/index.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { render } from 'react-dom';
33
import GraphiQL from 'graphiql';
4-
import 'graphiql/graphiql.css';
54

65
const Logo = () => <span>{'My Corp'}</span>;
76

examples/graphiql-webpack/webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ module.exports = {
5252
test: /\.svg$/,
5353
use: [{ loader: 'svg-inline-loader' }],
5454
},
55+
{
56+
test: /\.(woff|woff2|eot|ttf|otf)$/,
57+
use: ['file-loader'],
58+
},
5559
],
5660
},
5761
resolve: {

examples/monaco-graphql-webpack/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
import 'regenerator-runtime/runtime';
44
import 'monaco-graphql/esm/monaco.contribution';
55

6+
// eslint-disable-next-line spaced-comment
7+
/// <reference path='../../../node_modules/monaco-editor/monaco.d.ts'/>
8+
// eslint-disable-next-line spaced-comment
9+
/// <reference path='../../../packages/monaco-graphql/src/typings/monaco.d.ts'/>
10+
611
// NOTE: using loader syntax becuase Yaml worker imports editor.worker directly and that
712
// import shouldn't go through loader syntax.
813
// @ts-ignore

packages/monaco-graphql/src/typings/monaco.d.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
/// <reference path='../../../../node_modules/monaco-editor/monaco.d.ts'/>
1010

1111
declare module monaco.languages.graphql {
12-
import type {
13-
SchemaLoader,
14-
SchemaConfig as SchemaConfiguration,
15-
} from 'graphql-languageservice';
12+
import type { SchemaLoader, SchemaConfig } from 'graphql-languageservice';
1613

1714
import type { GraphQLSchema } from 'graphql';
1815
import type { Options as PrettierConfig } from 'prettier';
@@ -23,7 +20,7 @@ declare module monaco.languages.graphql {
2320
dispose(): void;
2421
}
2522

26-
export type SchemaConfig = SchemaConfiguration;
23+
export type SchemaConfig = SchemaConfig;
2724

2825
export interface IEvent<T> {
2926
(listener: (e: T) => any, thisArg?: any): IDisposable;
@@ -111,7 +108,7 @@ declare module monaco.languages.graphql {
111108

112109
export interface api extends MonacoGraphQLApi {}
113110

114-
// export const graphqlDefaults: LanguageServiceDefaults;
111+
export const graphqlDefaults: LanguageServiceDefaults;
115112
}
116113

117114
// declare module ''monaco-editor-core/esm/vs/editor/editor.worker';

0 commit comments

Comments
 (0)