babel-plugin-jsx/packages/jsx-explorer/vite.config.ts

33 lines
720 B
TypeScript
Raw Normal View History

2023-06-22 12:14:02 +08:00
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';
2023-06-22 12:14:02 +08:00
export default defineConfig({
build: {
commonjsOptions: {
include: [],
},
},
resolve: {
alias: {
'@vue/babel-plugin-jsx': '@vue/babel-plugin-jsx/src/index.ts',
},
},
2023-06-22 12:14:02 +08:00
plugins: [
VueJSX(),
// @ts-expect-error
(MonacoEditorPlugin.default as typeof MonacoEditorPlugin)({
languageWorkers: ['editorWorkerService', 'typescript'],
}),
2023-06-22 12:14:02 +08:00
nodePolyfills({
globals: {
process: true,
},
}),
],
optimizeDeps: {
disabled: false,
},
2023-06-22 12:14:02 +08:00
});