Passed
Push — v1 ( 3fd45a...127fa9 )
by Andrew
11:40 queued 04:29
created

buildchain/vite.config.js   A

Complexity

Total Complexity 2
Complexity/F 2

Size

Lines of Code 37
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 24
c 0
b 0
f 0
dl 0
loc 37
rs 10
wmc 2
mnd 1
bc 1
fnc 1
bpm 1
cpm 2
noi 0
1
import vue from '@vitejs/plugin-vue'
2
import ViteRestart from 'vite-plugin-restart';
3
import path from 'path';
4
5
// https://vitejs.dev/config/
6
export default ({ command }) => ({
7
  base: command === 'serve' ? '' : '/dist/',
8
  build: {
9
    manifest: true,
10
    rollupOptions: {
11
      input: {
12
        app: '/src/js/app.ts',
13
        welcome: '/src/js/welcome.ts',
14
      },
15
      output: {
16
        sourcemap: true
17
      },
18
    }
19
  },
20
  plugins: [
21
    ViteRestart({
22
      reload: [
23
          '../src/templates/**/*',
24
      ],
25
    }),
26
    vue(),
27
  ],
28
  resolve: {
29
    alias: {
30
      '@': path.resolve('/src/'),
31
    },
32
  },
33
  server: {
34
    port: 3001,
35
    strictPort: true,
36
  }
37
});
38