upload 28/5
This commit is contained in:
29
vite.config.ts
Normal file
29
vite.config.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import preact from '@preact/preset-vite';
|
||||
import path from 'path';
|
||||
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [preact()],
|
||||
server: {
|
||||
watch: {
|
||||
// Thêm thư mục ngoài src mà bạn muốn theo dõi
|
||||
usePolling: true, // Dùng polling để theo dõi thay đổi
|
||||
ignored: ['!**/node_modules/**'], // Loại bỏ các thư mục không cần theo dõi
|
||||
}
|
||||
},
|
||||
base: '/assets/', // base public path
|
||||
build: {
|
||||
outDir: 'public_html/assets/builder', // build vào đúng thư mục bạn cần
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: path.resolve(__dirname, 'src/index.tsx'),
|
||||
output: {
|
||||
entryFileNames: 'index.js',
|
||||
assetFileNames: 'style.css',
|
||||
}
|
||||
}
|
||||
},
|
||||
publicDir: 'static',
|
||||
});
|
||||
Reference in New Issue
Block a user