mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-10 09:39:14 +08:00
fix: enable optimizing dependencies in build mode
This commit is contained in:
parent
20ef600064
commit
bb8cbe957e
@ -57,7 +57,9 @@ function main() {
|
|||||||
model: monaco.editor.createModel(
|
model: monaco.editor.createModel(
|
||||||
decodeURIComponent(window.location.hash.slice(1)) ||
|
decodeURIComponent(window.location.hash.slice(1)) ||
|
||||||
persistedState.src ||
|
persistedState.src ||
|
||||||
'const App = () => <div>Hello World</div>',
|
`import { defineComponent } from 'vue'
|
||||||
|
|
||||||
|
const App = defineComponent((props) => <div>Hello World</div>)`,
|
||||||
'typescript',
|
'typescript',
|
||||||
monaco.Uri.parse('file:///app.tsx')
|
monaco.Uri.parse('file:///app.tsx')
|
||||||
),
|
),
|
||||||
|
@ -4,6 +4,11 @@ import VueJSX from '@vitejs/plugin-vue-jsx';
|
|||||||
import MonacoEditorPlugin from 'vite-plugin-monaco-editor';
|
import MonacoEditorPlugin from 'vite-plugin-monaco-editor';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
commonjsOptions: {
|
||||||
|
include: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@vue/babel-plugin-jsx': '@vue/babel-plugin-jsx/src/index.ts',
|
'@vue/babel-plugin-jsx': '@vue/babel-plugin-jsx/src/index.ts',
|
||||||
@ -21,4 +26,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
optimizeDeps: {
|
||||||
|
disabled: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user