-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathvite.config.js
35 lines (34 loc) · 1.17 KB
/
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
import { defineConfig } from "vite";
import { resolve, join } from "path";
import RubyPlugin, { projectRoot } from "vite-plugin-ruby";
import { createVuePlugin } from "vite-plugin-vue2";
import legacy from "@vitejs/plugin-legacy";
export default defineConfig({
build: {
emptyOutDir: true,
target: ["chrome65", "es2019"],
},
plugins: [RubyPlugin(), createVuePlugin(), legacy({ targets: ["defaults"] })],
resolve: {
alias: {
"@": resolve(join(projectRoot, "app/frontend")),
"@sharedComponents": resolve(join(projectRoot, "app/frontend/shared/components")),
"@images": resolve(join(projectRoot, "app/frontend/images")),
// See config/vite.rb for where these are set
// https://vite-ruby.netlify.app/config/#ruby-configuration-file-💎
"@formtastic": process.env.FORMTASTIC_STYLESHEET_PATH,
},
},
test: {
globals: true,
environment: "jsdom",
coverage: {
provider: "v8",
reporter: ["lcov", "text"],
},
// This hides the "Download the Vue Devtools extension" message from the console
onConsoleLog(log) {
if (log.includes("Download the Vue Devtools extension")) return false;
},
},
});