mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-10 09:39:14 +08:00
chore: set monaco-editor jsx as preserve
This commit is contained in:
parent
53739e1d5c
commit
f519920db2
@ -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,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user