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({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
// Use the plugin with development mode settings for UMD builds
|
react(),
|
||||||
react({
|
|
||||||
jsxRuntime: 'classic', // Use classic JSX runtime for better CDN compatibility
|
|
||||||
}),
|
|
||||||
dts({
|
dts({
|
||||||
include: ['src'],
|
include: ['src'],
|
||||||
outDir: 'dist',
|
outDir: 'dist',
|
||||||
|
|
@ -45,11 +42,12 @@ export default defineConfig({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: ['react', 'react-dom'],
|
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
||||||
output: {
|
output: {
|
||||||
globals: {
|
globals: {
|
||||||
react: 'React',
|
react: 'React',
|
||||||
'react-dom': 'ReactDOM',
|
'react-dom': 'ReactDOM',
|
||||||
|
'react/jsx-runtime': 'jsxRuntime',
|
||||||
},
|
},
|
||||||
assetFileNames: 'styles.[ext]',
|
assetFileNames: 'styles.[ext]',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue