-
Notifications
You must be signed in to change notification settings - Fork 23
/
vite.config.ts
41 lines (39 loc) · 1.75 KB
/
vite.config.ts
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
40
41
/* eslint-disable no-undef */
import { defineConfig } from 'vite';
import path from 'path';
// Config Hints:
// https://vitejs.dev/guide/build.html#multi-page-app
export default defineConfig(({ command }) => {
console.log(`Running: ${command}`);
return {
build: {
rollupOptions: {
external: [
'three',
'three/examples/jsm/controls/TrackballControls',
'three/examples/jsm/helpers/VertexNormalsHelper',
'three/examples/jsm/loaders/MTLLoader'
],
input: {
index: path.resolve(__dirname, 'index.html'),
obj2_basic: path.resolve(__dirname, 'packages/examples/obj2_basic.html'),
obj2parallel_basic: path.resolve(__dirname, 'packages/examples/obj2parallel_basic.html'),
obj2_options: path.resolve(__dirname, 'packages/examples/obj2_options.html'),
obj2_obj_compare: path.resolve(__dirname, 'packages/examples/obj2_obj_compare.html'),
obj2_bugverify: path.resolve(__dirname, 'packages/examples/obj2_bugverify.html'),
obj2_react: path.resolve(__dirname, 'packages/examples/obj2_react.html'),
obj2_react_mtl: path.resolve(__dirname, 'packages/examples/obj2_react-mtl.html'),
assetpipeline: path.resolve(__dirname, 'packages/examples/assetpipeline.html'),
assetpipeline_obj_stage: path.resolve(__dirname, 'packages/examples/assetpipeline_obj_stage.html')
}
}
},
server: {
port: 8085,
host: '0.0.0.0'
},
test: {
passWithNoTests: true
}
};
});