Skip to content

Commit

Permalink
make vite cjs loader resolve cjs version
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Aug 2, 2023
1 parent 33966ca commit 1ac8b46
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .changeset/fluffy-pens-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'monaco-graphql': patch
---

import only `editor.api` & basic features, add `monaco-graphql/lite`

- switch from exporting `edcore.js` to `editor.api.js` as recommended, and minimal features to get the editor working
- `edcore` imports `editor.all` which contains many monaco-editor features we don't use
- dynamic import of `json` language mode only if the user supplies configuration for json validation
- update monaco examples to show minimal `typescript` implementation alongside `graphql`
- add new simplified `exports` with backwards compatibility:
- `monaco-graphql/initializeMode`
- `monaco-graphql/graphql.worker`
- `monaco-graphql/monaco-editor`
- introduce `monaco-graphql/lite` for users who want the most minimum version possible, and to only import the features they need
5 changes: 5 additions & 0 deletions packages/monaco-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"require": "./*",
"types": "./*"
},
"./esm/graphql.worker": {
"import": "./esm/graphql.worker.js",
"require": "./dist/graphql.worker.js",
"types": "./esm/graphql.worker.d.ts"
},
"./lite": {
"import": "./esm/lite.js",
"types": "./esm/lite.d.ts"
Expand Down

0 comments on commit 1ac8b46

Please sign in to comment.