mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
build(webui): Update Vite configuration to optimize React build settings
This commit is contained in:
parent
8d2d29a422
commit
dfdc4e6c59
1 changed files with 3 additions and 5 deletions
|
|
@ -21,10 +21,7 @@ import { resolve } from 'path';
|
|||
*/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
// Use the plugin with development mode settings for UMD builds
|
||||
react({
|
||||
jsxRuntime: 'classic', // Use classic JSX runtime for better CDN compatibility
|
||||
}),
|
||||
react(),
|
||||
dts({
|
||||
include: ['src'],
|
||||
outDir: 'dist',
|
||||
|
|
@ -45,11 +42,12 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['react', 'react-dom'],
|
||||
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
||||
output: {
|
||||
globals: {
|
||||
react: 'React',
|
||||
'react-dom': 'ReactDOM',
|
||||
'react/jsx-runtime': 'jsxRuntime',
|
||||
},
|
||||
assetFileNames: 'styles.[ext]',
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue