v7.0.0 release
This commit is contained in:
1 parent
0e7fa04b03
commit
c4ea9a6cd1
3582 files changed
+626189
-160151
No files matched your search
+1
-25
@@ -1,33 +1,9 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import { copyFileSync, mkdirSync, readdirSync } from 'fs';
|
||||
|
||||
// 다국어 파일 복사 플러그인
|
||||
function copyLangFiles() {
|
||||
return {
|
||||
name: 'copy-lang-files',
|
||||
closeBundle() {
|
||||
const srcLangDir = path.resolve(__dirname, 'resources/js/core/lang');
|
||||
const destLangDir = path.resolve(__dirname, 'public/build/core/lang');
|
||||
|
||||
mkdirSync(destLangDir, { recursive: true });
|
||||
|
||||
// lang 디렉토리의 모든 .json 파일 복사
|
||||
const files = readdirSync(srcLangDir).filter(file => file.endsWith('.json'));
|
||||
|
||||
files.forEach(file => {
|
||||
const src = path.join(srcLangDir, file);
|
||||
const dest = path.join(destLangDir, file);
|
||||
copyFileSync(src, dest);
|
||||
console.log(`✓ Copied ${file} to public/build/core/lang/`);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react(), copyLangFiles()],
|
||||
plugins: [react()],
|
||||
publicDir: false,
|
||||
// 환경 변수 정의 (React 빌드용)
|
||||
define: {
|
||||
|
||||
Reference in new issue
Block a user