-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.examples.js
More file actions
39 lines (38 loc) · 1.03 KB
/
vite.config.examples.js
File metadata and controls
39 lines (38 loc) · 1.03 KB
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
35
36
37
38
39
import { defineConfig } from 'vite';
import path from 'path';
export default defineConfig({
root: 'examples',
base: './',
publicDir: path.resolve(import.meta.dirname, 'public'),
resolve: {
alias: {
'@opengolfsim/fuse': path.resolve(import.meta.dirname, 'src/index.ts'),
'@': path.resolve(import.meta.dirname, 'src'),
},
},
build: {
sourcemap: true,
outDir: path.resolve(import.meta.dirname, 'dist/examples'),
emptyOutDir: true,
target: 'es2020',
rollupOptions: {
input: {
main: path.resolve(import.meta.dirname, 'examples/index.html'),
range: path.resolve(import.meta.dirname, 'examples/range/index.html'),
courses: path.resolve(import.meta.dirname, 'examples/courses/index.html'),
},
},
},
plugins: [
{
name: 'custom-cli-message',
configureServer(server) {
const _print = server.printUrls;
server.printUrls = () => {
console.log('\n FUSE Examples running\n');
_print();
};
},
},
],
});