22 lines
413 B
TypeScript
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,
|
|
},
|
|
});
|