aboutsummaryrefslogtreecommitdiffstats
path: root/vite.config.js
blob: 0af7e4de61e5444da3fa935b1fcbb088f66d4516 (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
/* eslint-disable */
import path from 'path';

export default {
  build: {
    sourcemap: true,
    outDir: "dist",
    assetsDir: "assets",
    rollupOptions: {
      output: {
        codeSplitting: {
          groups: [
            {
              name: 'ol_source',
              test: /node_modules[\\/]ol[\\/]source/,
            },
            {
              name: 'ol',
              test: /node_modules[\\/]ol/,
            },
            {
              name: 'bootstrap',
              test: /node_modules[\\/]bootstrap/,
            },
            {
              name: 'proj4',
              test: /node_modules[\\/]proj4/,
            },
          ],
        },
      }
    }
  },
  css: {
    devSourcemap: true
  },
  resolve: {
    alias: {
      "~bootstrap": path.resolve(__dirname, "node_modules/bootstrap"),
      "~bootstrap-icons": path.resolve(__dirname, "node_modules/bootstrap-icons"),
      "~ol": path.resolve(__dirname, "node_modules/ol"),
      "~fontsource": path.resolve(__dirname, "node_modules/@fontsource"),
    }
  },
  server: {
    host: "::1",
    port: 5173,
    strictPort: true,
    watch: {
      ignored: ['**/tiles/**'],
    },
  }
}