-
Notifications
You must be signed in to change notification settings - Fork 18
/
vite.config.ts
41 lines (38 loc) · 955 Bytes
/
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
// Configuration for bundling the options page
import { resolve } from 'path'
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
// See https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
// Ensure that all parties import the exact same Vue build
vue: require.resolve('vue/dist/vue.runtime.esm-bundler.js'),
'@': resolve(__dirname, 'src')
}
},
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: tag => tag === 'focus-trap' || tag.startsWith('mwc-')
}
}
})
],
// Code that is copied directly to the extension directory
publicDir: 'static',
root: resolve('src'),
server: { port: 6655 },
build: {
assetsDir: '.',
outDir: '../extension',
emptyOutDir: true,
target: 'chrome89',
sourcemap: true,
minify: false
},
test: {
include: ['./test/unit/**/*.test.ts']
}
})