mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2024-11-10 09:39:14 +08:00
33 lines
720 B
TypeScript
33 lines
720 B
TypeScript
import { defineConfig } from 'vite';
|
|
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
|
import VueJSX from '@vitejs/plugin-vue-jsx';
|
|
import MonacoEditorPlugin from 'vite-plugin-monaco-editor';
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
commonjsOptions: {
|
|
include: [],
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@vue/babel-plugin-jsx': '@vue/babel-plugin-jsx/src/index.ts',
|
|
},
|
|
},
|
|
plugins: [
|
|
VueJSX(),
|
|
// @ts-expect-error
|
|
(MonacoEditorPlugin.default as typeof MonacoEditorPlugin)({
|
|
languageWorkers: ['editorWorkerService', 'typescript'],
|
|
}),
|
|
nodePolyfills({
|
|
globals: {
|
|
process: true,
|
|
},
|
|
}),
|
|
],
|
|
optimizeDeps: {
|
|
disabled: false,
|
|
},
|
|
});
|