-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
34 lines (28 loc) · 763 Bytes
/
vite.config.ts
File metadata and controls
34 lines (28 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import vue from '@vitejs/plugin-vue';
import dns from 'dns';
import { defineConfig } from 'vite';
const path = require('path');
const fs = require('fs');
// https://vitejs.dev/config/server-options.html#server-host
dns.setDefaultResultOrder('verbatim');
// make sure vite picks up all html files in root
const allHtmlEntries = fs
.readdirSync('.')
.filter((file) => path.extname(file) === '.html')
.reduce((acc, file) => {
acc[path.basename(file, '.html')] = path.resolve(__dirname, file);
return acc;
}, {});
// https://vitejs.dev/config/
export default defineConfig({
build: {
rollupOptions: {
input: allHtmlEntries,
},
},
base: '/miro-plugin-shuffle-objects/',
plugins: [vue()],
server: {
port: 3000,
},
});