36 lines
778 B
TypeScript
36 lines
778 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
build: {
|
|
lib: {
|
|
entry: 'src/index.tsx',
|
|
formats: ['es'],
|
|
fileName: () => 'index.js', // 🔥 이거 중요
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
'react',
|
|
'react-dom',
|
|
'lexical',
|
|
'@lexical/react',
|
|
'@lexical/html',
|
|
'@lexical/list',
|
|
'@lexical/markdown',
|
|
'@lexical/rich-text',
|
|
'@lexical/selection',
|
|
'@lexical/utils',
|
|
'@lexkit/editor',
|
|
],
|
|
output: {
|
|
globals: {
|
|
react: 'React',
|
|
'react-dom': 'ReactDOM'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|