agchart/vite.config.ts
2026-05-21 09:24:15 +08:00

22 lines
413 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [
react(),
{
name: 'weaver-script-scope-wrapper',
renderChunk(code, chunk) {
if (!chunk.isEntry) return null;
return {
code: `;(() => {\n${code}\n})();\n`,
map: null,
};
},
},
],
server: {
port: 5173,
},
});