generated from CityOfVernonia/vite-map-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
41 lines (35 loc) · 906 Bytes
/
vite.config.js
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
// https://vitejs.dev/config/
import { resolve } from 'path';
import { ViteEjsPlugin } from 'vite-plugin-ejs';
import _package from './package.json';
const calciteVersion = _package.dependencies['@esri/calcite-components'].replace('^', '').replace('~', '');
const calciteUrl = `https://js.arcgis.com/calcite-components/${calciteVersion}/calcite.esm.js`;
export default {
plugins: [
ViteEjsPlugin({
calciteUrl,
}),
],
// where's the source
root: './src',
// dev server options
server: {
// https: true,
port: 8080,
open: true,
},
build: {
// where to build relative to source
outDir: './../dist',
rollupOptions: {
input: {
main: resolve(__dirname, 'src/index.html'),
address: resolve(__dirname, 'src/address/index.html'),
},
},
},
esbuild: {
// to build esri widgets properly
jsxFactory: 'tsx',
},
};