Skip to content
Open
Show file tree
Hide file tree
Changes from 169 commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
b79578b
feat: init configs
killthecreator Apr 24, 2023
5e7ac32
feat: change project title
killthecreator Apr 24, 2023
78e93b8
feat: add basic layout with routes
killthecreator Apr 24, 2023
3aa9968
feat: add routong and next.js authentification with firebase adapter
killthecreator Apr 24, 2023
013d02a
feat: add library components
HelgaAthame Apr 25, 2023
aacda6a
Merge pull request #2 from killthecreator/feature/pages
killthecreator Apr 25, 2023
8edfb07
fix: fix errors respectively to menthors code review
killthecreator Apr 25, 2023
a2accd1
fix: fix errors respectively to menthors code review
HelgaAthame Apr 25, 2023
b04146b
Merge pull request #3 from killthecreator/feature/pages
killthecreator Apr 25, 2023
464a5a3
Merge branch 'develop' into components
HelgaAthame Apr 25, 2023
4bde8f5
Merge pull request #1 from killthecreator/components
killthecreator Apr 25, 2023
4e94b3a
change editor title
killthecreator Apr 25, 2023
6860347
feat:remake header menu design
HelgaAthame Apr 25, 2023
5e22e4d
feat: remake footer menu design
HelgaAthame Apr 25, 2023
58e32c3
feat: add query section
HelgaAthame Apr 25, 2023
bd8e1f4
Merge pull request #4 from killthecreator/design
killthecreator Apr 25, 2023
2183a91
feat: add light and dark mode switch
HelgaAthame Apr 25, 2023
6ca3993
feat: add redux rtk and trkQuery
HelgaAthame Apr 26, 2023
e43c62c
feat: add dark and light mode to redux
HelgaAthame Apr 26, 2023
909ec16
make firebase auth
killthecreator Apr 26, 2023
f79b31f
feat: add client password validation
killthecreator Apr 27, 2023
ede70d0
feat: add server error handling
killthecreator Apr 27, 2023
5354a42
feat: add fields error styling
killthecreator Apr 27, 2023
8d8ae64
feat: create simple fetch
HelgaAthame Apr 27, 2023
9a2f042
feat: add request and response handling
HelgaAthame Apr 28, 2023
f9d834b
feat: addd custom scroll
HelgaAthame Apr 28, 2023
8ec3bbd
feat: move to styled components from the lib
killthecreator Apr 28, 2023
caa044a
fix: fix handling error on sign up
killthecreator Apr 28, 2023
c86696b
feat: correct mistakes
HelgaAthame Apr 29, 2023
ce1438f
feat: correct pr mistakes
HelgaAthame Apr 29, 2023
64329f1
feat: add scrollarea to response section
HelgaAthame Apr 29, 2023
4750d7c
Merge pull request #5 from killthecreator/redux
killthecreator Apr 29, 2023
47dd346
Merge branch 'develop' into feature/auth
HelgaAthame May 1, 2023
b4c2495
Merge pull request #6 from killthecreator/feature/auth
HelgaAthame May 1, 2023
7170363
fix: fix code review issues
killthecreator May 1, 2023
a7b1266
fix: fix styles issues according to code review
killthecreator May 1, 2023
c1f927d
Merge branch 'develop' of https://github.com/killthecreator/graphiql-…
killthecreator May 1, 2023
9939bd1
fix: fix footer styling
killthecreator May 1, 2023
aca27fc
fix: fix some elements in darkmode
killthecreator May 1, 2023
eb14596
refactor: updatae .env
killthecreator May 1, 2023
c397aa0
fix: correct validation
killthecreator May 1, 2023
4cf4a42
feat: add scroll header effect
killthecreator May 1, 2023
652bc11
fix: fix classes for shadow
killthecreator May 1, 2023
758e1f1
feat: add graphql response loader
alexmegadrive May 1, 2023
d166d43
feat: add darkmode box shadow
killthecreator May 1, 2023
5cd8bd7
feat: edit skeleton layout
alexmegadrive May 1, 2023
5ce2441
fix: remove test height value
killthecreator May 1, 2023
1b17873
fix: remove correct testing value:)
killthecreator May 1, 2023
a7816f0
fix: fix validation message
killthecreator May 1, 2023
860815b
fix: fix client validation
killthecreator May 1, 2023
35dd946
fix: fix imports
killthecreator May 1, 2023
251f666
Merge branch 'feature/sticky-header' into develop
killthecreator May 1, 2023
c1665e9
Merge branch 'feature/auth-restriction' into develop
killthecreator May 1, 2023
5c65784
feat: create headers like in postman
HelgaAthame May 2, 2023
a1f359c
feat: test iframe
alexmegadrive May 2, 2023
1ba6ce5
feat: update iframe style
alexmegadrive May 2, 2023
3ac1371
Merge branch 'develop' into headers
HelgaAthame May 3, 2023
b076e1d
Merge pull request #8 from killthecreator/headers
killthecreator May 3, 2023
e9863a0
fix: remove duplicate imports after merging
HelgaAthame May 3, 2023
c56e7d1
feat: load documentation if ruery is introspective
HelgaAthame May 3, 2023
955b558
feat: dont display documentation if error
HelgaAthame May 3, 2023
56fe87b
feat: load custom pages of docs from the response
HelgaAthame May 3, 2023
f8b7d16
feat: create error boundary
HelgaAthame May 5, 2023
a4d9bde
fix: remove navigation menu from header
HelgaAthame May 5, 2023
6025e16
fix: fix hydration errors
HelgaAthame May 7, 2023
6c70313
Merge pull request #9 from killthecreator/lazy-loading-ha
HelgaAthame May 7, 2023
1addd0a
Merge branch 'develop' into documentation-lazyloading
HelgaAthame May 7, 2023
5e53be5
Merge pull request #11 from killthecreator/documentation-lazyloading
killthecreator May 7, 2023
a9510ea
Merge branch 'develop' into errors
HelgaAthame May 7, 2023
8ae3ab4
Merge pull request #12 from killthecreator/errors
killthecreator May 7, 2023
92e4d8c
feat: add monaco
HelgaAthame May 8, 2023
08f7037
add monaco to project
HelgaAthame May 9, 2023
3cb6348
feat: add data handling
HelgaAthame May 9, 2023
7f52751
fix: correct some console errors
HelgaAthame May 10, 2023
d6339ae
feat: add react monaco editor
HelgaAthame May 11, 2023
570a912
feat: add some styles to editor window
HelgaAthame May 11, 2023
1abe30c
feat: config monako editor
HelgaAthame May 11, 2023
1d034ce
feat: config initial state
HelgaAthame May 11, 2023
02fef02
feat: add shadcn skeleton
HelgaAthame May 11, 2023
4d093ef
feat: add monaco response editor
HelgaAthame May 12, 2023
728fed4
Merge pull request #13 from killthecreator/monaco
killthecreator May 12, 2023
bfd4909
increase header z index
killthecreator May 12, 2023
ac89f20
feat: add new favicon
killthecreator May 12, 2023
873f762
add protected route
killthecreator May 12, 2023
c35bbb8
fix: remove links from header, feat: add lang switch
killthecreator May 12, 2023
4216126
fix: correct styles
HelgaAthame May 13, 2023
4b7c993
feat: add custom favicon
HelgaAthame May 13, 2023
55e9eb2
refactor: remove unused files
HelgaAthame May 15, 2023
2db6a9e
merge
killthecreator May 15, 2023
169f9a8
feat: add redirect button on 404 page
killthecreator May 15, 2023
80a9aec
feat: error handling in user-friendly popup
HelgaAthame May 15, 2023
e0f569c
feat: take changes
HelgaAthame May 15, 2023
b25c9a6
Merge pull request #14 from killthecreator/design-ui
killthecreator May 15, 2023
9948619
fix: word entry
killthecreator May 15, 2023
2d1ef73
merge
killthecreator May 15, 2023
7d59a75
fix: correct errors
HelgaAthame May 15, 2023
ed6c37c
Merge pull request #15 from killthecreator/correct-errors
killthecreator May 15, 2023
9852403
ci
killthecreator May 15, 2023
0eea57d
Merge branch 'develop' of https://github.com/killthecreator/graphiql-…
killthecreator May 15, 2023
e7c9b45
merge
killthecreator May 15, 2023
e0f04f3
feat: disable ssr for editor page loading
killthecreator May 15, 2023
0d37eb2
feat: remake 4040 page
HelgaAthame May 15, 2023
49b41ce
fix: fix some import links
killthecreator May 15, 2023
fda5383
fix: fix another import link
killthecreator May 15, 2023
15a14c1
fix: remove unneeded imports from Footer component
killthecreator May 15, 2023
178b522
change monaco scrollers width
killthecreator May 15, 2023
86de229
feat: add more skeletons on editor
killthecreator May 15, 2023
44c8eb2
feat: add localization
killthecreator May 15, 2023
7d4af84
feat: add firebase API errors localization
killthecreator May 15, 2023
fb5792f
refactor: configs
killthecreator May 15, 2023
49f289a
feat: config adaptivity
HelgaAthame May 16, 2023
25dacd4
feat: add error button styles
HelgaAthame May 16, 2023
d4388b4
Merge branch 'develop' into design-view
HelgaAthame May 16, 2023
101c864
Merge pull request #16 from killthecreator/design-view
killthecreator May 16, 2023
89ea54e
refactor: refactore Head next element
killthecreator May 16, 2023
aa11387
fix: fix welcome page buttons gap
killthecreator May 16, 2023
78108d1
feat: add 404 translation
killthecreator May 16, 2023
ea13fbd
refactor: remove unneeded vars from Homepage
killthecreator May 16, 2023
2aeb839
refactor: refactore editor page component
killthecreator May 16, 2023
c0a5d0d
refactor: remove unneeded vars in editor
killthecreator May 16, 2023
f0441ce
feat: add translation for docs window description
killthecreator May 16, 2023
430454c
refactor: docs styling moved to tailwind, feat: add docs darkmode
killthecreator May 16, 2023
eba25b0
feat: add some info to welcome page
HelgaAthame May 16, 2023
27913bc
feat: add photos
HelgaAthame May 16, 2023
38d8674
feat: add nprogress loader
killthecreator May 16, 2023
d5ce2bb
fix: fix nprogress styles
killthecreator May 16, 2023
32822d6
feat: add info about school and course
HelgaAthame May 16, 2023
4bd741d
Merge pull request #17 from killthecreator/welcome-page
killthecreator May 16, 2023
ececb00
feat: add adaptivity for homepage
killthecreator May 17, 2023
903a1e7
feat: remake grid columns
killthecreator May 17, 2023
28652c9
fix: fix image height
killthecreator May 17, 2023
e11f951
fix: change favicon format
killthecreator May 18, 2023
4e4a907
fix: add locale path
killthecreator May 18, 2023
ae16fb6
fix: add path var to next config
killthecreator May 18, 2023
8d87f60
fix: remove eslint rule for now
killthecreator May 18, 2023
2a0e8af
fix: fix eslint issues
killthecreator May 18, 2023
678525f
fix: bring back eslint disablence in editor page
killthecreator May 18, 2023
166f224
fix: fix monaco text translation
killthecreator May 18, 2023
8c46deb
feat: correct header and footer styles
HelgaAthame May 18, 2023
0ee89b6
fix: fix login text color, fix wrong pass message
killthecreator May 18, 2023
b569873
feat: put buttons to the header
HelgaAthame May 18, 2023
06d58b0
feat: correct button appearance
HelgaAthame May 18, 2023
66f1d81
feat: correct popup size
HelgaAthame May 18, 2023
83aba7a
Merge pull request #18 from killthecreator/header
killthecreator May 18, 2023
a43699e
refactor: put consts into data folder
HelgaAthame May 19, 2023
2114386
feat: add react course information
HelgaAthame May 19, 2023
f056c79
feat: add graphiql description
HelgaAthame May 19, 2023
9e8cd8e
feat: add description md file
HelgaAthame May 19, 2023
70938ea
doc: start writing description file
HelgaAthame May 19, 2023
961d9a3
fix: fix sign in / sign up translation, fix login button width
killthecreator May 19, 2023
6553a56
fix: fix login position on mobile, fix header padding and gap between…
killthecreator May 19, 2023
85e1055
fix: fix rs logo size, fix: some linter issues
killthecreator May 19, 2023
3be04a8
feat: add key prop
killthecreator May 19, 2023
d80bb4d
refactor: delete env example
killthecreator May 19, 2023
4e07058
feat: rewrite documentation section
HelgaAthame May 20, 2023
560b0fb
Merge pull request #19 from killthecreator/description
killthecreator May 20, 2023
766aa38
doc: write description.md
HelgaAthame May 21, 2023
04fb9a8
feat: add additional information
HelgaAthame May 22, 2023
a29e4db
feat: correct next linter errors
HelgaAthame May 22, 2023
958dc44
fix: correct new lint errors
HelgaAthame May 22, 2023
bf36d43
Merge pull request #20 from killthecreator/aboutapp
killthecreator May 22, 2023
f5a1bc9
fix: correct build errors
HelgaAthame May 22, 2023
e23413a
Merge pull request #21 from killthecreator/aboutapp
killthecreator May 22, 2023
0447736
feat: chenge colors
HelgaAthame May 22, 2023
b5c6d07
feat: correct next linter errors
HelgaAthame May 22, 2023
1b70a2b
fix:delete dot
HelgaAthame May 22, 2023
7c0d9d6
Merge pull request #22 from killthecreator/aboutapp
killthecreator May 22, 2023
156954b
feat: add validation for cyrilic
HelgaAthame May 24, 2023
afc16d2
Merge pull request #23 from killthecreator/validate
killthecreator May 24, 2023
603ad2e
translate iframe
HelgaAthame May 28, 2023
2104bc1
fix: correct useAppSelector usage
HelgaAthame May 28, 2023
40477ac
fix: corrections
HelgaAthame May 28, 2023
ff2e666
fix: add isError declaration
HelgaAthame May 28, 2023
84e6efe
feat: add env.example
HelgaAthame May 28, 2023
360d413
fix: correct linter issues
HelgaAthame May 28, 2023
688a892
Merge pull request #24 from killthecreator/bugs
killthecreator May 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"next/core-web-vitals",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended"
],
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true
},
"root": true,
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "react", "prettier", "react-hooks"],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"comma-dangle": ["error", "only-multiline"],
"react/prop-types": "off",
"react/display-name": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"prettier/prettier": ["error", { "endOfLine": "auto" }],
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-var-reqiures": "off",
"@typescript-eslint/consistent-type-imports": [
"warn",
{
"prefer": "type-imports",
"fixStyle": "inline-type-imports"
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_" }
],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
}
}
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal

# next.js
/.next/
/out/
next-env.d.ts

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
# graphiql-app
# NPM version 8.19.2

# Create T3 App

This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`.

## What's next? How do I make an app with this?

We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.

If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our [Discord](https://t3.gg/discord) and ask for help.

- [Next.js](https://nextjs.org)
- [NextAuth.js](https://next-auth.js.org)
- [Prisma](https://prisma.io)
- [Tailwind CSS](https://tailwindcss.com)
- [tRPC](https://trpc.io)

## Learn More

To learn more about the [T3 Stack](https://create.t3.gg/), take a look at the following resources:

- [Documentation](https://create.t3.gg/)
- [Learn the T3 Stack](https://create.t3.gg/en/faq#what-learning-resources-are-currently-available) — Check out these awesome tutorials

You can check out the [create-t3-app GitHub repository](https://github.com/t3-oss/create-t3-app) — your feedback and contributions are welcome!

## How do I deploy this?

Follow our deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel), [Netlify](https://create.t3.gg/en/deployment/netlify) and [Docker](https://create.t3.gg/en/deployment/docker) for more information.
64 changes: 64 additions & 0 deletions description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# GraphiQL

Our app is **GraphiQL** - a playground/IDE for graphQL requests. GraphiQL is a sandbox for compiling, editing and sending GraphQL requests to the server API and getting responses to them. Our application also allows user to specify variables and headers and add them to the request. The user can also retrieve the API schema using an introspective query. To perform validation, we always get the schema when the editor is loaded.

We also added authorization/authentication capabilities to our app, to give access to the tool to only to authorized users.

## Team
We worked on our app in a team of 3 developers: Olga Khmaruk, Gleb Belegov and Alexander Mikhailov. Our work was carried out in the private github repository graphiql-app. The develop branch was the main working branch. Each team member created new branch from develop, worked in this branch and after that made a pull request to the develop branch. Other teammates checked and commented new pull request code. After proper corrections pull requests were merged to the develop branch.

## API
We used an open GraphQL Pokemon api in our app. GraphQL-Pokemon is a GraphQL API that provides extensive Pokémon data. Unlike contemporary APIs this API focusses on speed, accuracy and data quality. API provides fully generated client-side TypeScript typings, images, information about various assets in Pokemon: Pokedex, Items, AbilitiesMoves, Learnsets, Type matchups. API has a detailed documentation with instructions for installation and use. The documentation also contains a description of possible queries and variables to them.

## Design
Design of our application is minimalistic. The color scheme is close to black and white. The user has the ability to change the color theme using the switcher in the header. Dark and light themes are available.
Layout is adaptive, the minimum page width of the application is less then 320px.
Elements users can interact with are interactive through hover effects, cursor pointer style, usage of different styles for the active and inactive state of the element and smooth animations.
The unity of styles of all pages of the application is provided by SHADCN component libruary - the same fonts, button styles, indents, the same elements on all pages of the application have the same appearance and layout.

## Application structure
Our site contains Welcome page, User auth, GraphiQL page with request editor, variables editor, headers editor, docummentation explorer and response section.
App layout consists of header, footer and main component between them.
All Private routes contains sticky header. It doesn't change it's positin during scrolling the page. We used blur effect to emphasize a moment the header becomes sticky. All the scrolled content becomes blurred under the header.
Header contation language and theme switches and sign in/ sign up/ sign out buttons on their proper places.
Footer contains a link to the authors' github pages, the year the application was created, course logo with link to the react course.
Footer is displayed on all pages of the application.

## Backend
We used firebase for implementing authentication and authorizing with username and password.

## Deploy
The demo version of the application is deployed on Vercel and available on deploy link.

## Localization
localization at enflish and russian languages is implemented using inbuilt nextjs i18 plugun. Uesr is able to change the language by clicking on the switcher in header.

## private routes
There are private routes in our app...
## 404
We created cistom 404 page. 404 page is shoun if url is not exist or user entered unexsisting url pathname. 404 page's has a button letting user to try to go to the Welcomepage
## error boundary
Error Boundary surrounds all the App components. for exaple, if we try to throw an error in our code, error fallback components will apear on the page. User may click Error button to look through an error happened and to try to navigate to Welcome page.
Errors from the api side - (Not found, unhandled rejection, etc) are displayed in a user-friendly format as a red button in the response section. Clicking this button user can read Error Message and Error description for being able to handle with error correcting.

## Docamentation
Documentation is lazy-loaded using Suspence. First, when page is loading the first time, we send an introspective query to our server API to get graphql schema. After schema has been got and saved to the redux store we parse it and create the documentation consisting on our schema types and enums by our own.
Then we compile documentation of the description of our API and our newly created from schema components after it.
We used accordion like components showing and hiding their content for user' better experience.

## Libraries
We used Next.js for building our app. It allows for server side rendering under the hood.

### Sign In
If user is not authorized, the welcome page contains a link to Sign In / Sign Up page. Buttons for Sign In / Sign Up are placed in the right side of the app header.
Pressing the Sign In / Sign up button redirects a user to the route with the Sign In / Sign up form.
If user is authorized, the page should contains a link to the Main editor page and sign out button. Button sign out signs user out.
Client-side validation should be implemented using hook form built-in validation features and user's custom validation functions. We verify if the password consists of proper symbols(email and password strength - minimum 8 symbols, at least one letter, one digit, one special character), if the password is correct, if the user with entered email already exists in the database and other email and password validation.
Upon successful login, the user is redirected to the Main page. Also if the user is already logged in and tries to reach these routes, he is redirected to the Main editor page.
For the authentication you should use Firebase with email option ans Firestore.

### Welcome route - max 10 points
The welcome page contains general information about the developers, project, and course. In the upper right corner there are 2 buttons: Sign In and Sign Up. If login token is valid and unexpired, change the Sign In and Sign Up buttons to the "Go to Main Page" button. When the token expires - the user is redirected to the "Welcome page" automatically.

### GraphiQL route - max 50 points
Working editor allowing to edit the query. Working documentation explorer is visible only when sdl request will succeed. Variables sectioncan be closed/opened. Headers section also may be closed/opened. Response section.
9 changes: 9 additions & 0 deletions next-i18next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const path = require("path");
module.exports = {
i18n: {
locales: ["en", "ru"],
defaultLocale: "en",
localeDetection: false,
localePath: path.resolve("./public/locales"),
},
};
68 changes: 68 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
await import("./src/env.mjs");
//import withImages from 'next-images';
import withTM from "next-transpile-modules";
import { createRequire } from "node:module";

import MonacoWebpackPlugin from "monaco-editor-webpack-plugin";
const withTMnew = withTM(["monaco-editor"]);

const require = createRequire(import.meta.url);
const { i18n } = require("./next-i18next.config");

/** @type {import("next").NextConfig} */
const config = {
webpack: (config, options) => {
config.output.publicPath = "/_next/";
// because next.js doesn't like node_modules that import css files
// this solves the issue for monaco-editor, which relies on importing css files
//patchWebpackConfig(config, options);
config.resolve.alias = {
...config.resolve.alias,

// this solves a bug with more recent `monaco-editor` versions in next.js,
// where vscode contains a version of `marked` with modules pre-transpiled, which seems to break the build.
//
// (the error mentions that exports.Lexer is a const that can't be re-declared)
"../common/marked/marked.js": "marked",
};
config.resolve.fallback = { fs: false };

if (!options.isServer) {
config.plugins.push(
// if you find yourself needing to override
// MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker,
// you probably just need to tweak configuration here.
new MonacoWebpackPlugin({
// you can add other languages here as needed
languages: ["json", "graphql"],
filename: "static/[name].worker.js",
// this is not in the plugin readme, but saves us having to override
// MonacoEnvironment.getWorkerUrl or similar.
customLanguages: [
{
label: "graphql",
worker: {
id: "graphql",
entry: require.resolve("monaco-graphql/esm/graphql.worker.js"),
},
},
],
})
);
}
// load monaco-editor provided ttf fonts
config.module.rules.push({ test: /\.ttf$/, type: "asset/resource" });
return config;
},
devIndicators: {
buildActivity: false,
},
reactStrictMode: true,
i18n,
};

export default withTMnew(config);
Loading