-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathvite.config.js
More file actions
39 lines (37 loc) · 848 Bytes
/
vite.config.js
File metadata and controls
39 lines (37 loc) · 848 Bytes
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
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import RubyPlugin from 'vite-plugin-ruby'
import * as path from 'node:path'
import { NodePackageImporter } from 'sass'
export default defineConfig({
plugins: [RubyPlugin()],
build: {
emptyOutDir: true,
cssMinify: 'esbuild'
},
css: {
preprocessorOptions: {
scss: {
api: 'modern',
importers: [new NodePackageImporter()],
quietDeps: true
},
devSourcemaps: true
},
transformer: 'postcss'
},
resolve: {
alias: {
'@govuk': path.resolve(
__dirname,
'node_modules/govuk-frontend/dist/govuk'
),
'@images': path.resolve(__dirname, 'app/frontend/images')
}
},
test: {
globals: true,
setupFiles: ['test/setup.js']
},
cacheDir: '../../node_modules/.vite'
})