Skip to content

Commit

Permalink
chore: set monaco-editor jsx as preserve
Browse files Browse the repository at this point in the history
  • Loading branch information
Amour1688 committed Sep 6, 2020
1 parent 53739e1 commit f519920
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/jsx-explorer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ window.init = () => {
monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
allowJs: true,
allowNonTsExtensions: true,
lib: [],
jsx: monaco.languages.typescript.JsxEmit.React,
jsx: monaco.languages.typescript.JsxEmit.Preserve,
target: monaco.languages.typescript.ScriptTarget.Latest,
typeRoots: ['node_modules/@types'],
});

const editor = monaco.editor.create(document.getElementById('source')!, {
value: decodeURIComponent(window.location.hash.slice(1)) || localStorage.getItem('state') || 'const App = () => <div>Hello World</div>',
language: 'javascript',
language: 'typescript',
tabSize: 2,
...sharedEditorOptions,
});
Expand Down

0 comments on commit f519920

Please sign in to comment.