-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
37 lines (35 loc) · 959 Bytes
/
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
36
37
import path from 'path'
import { defineConfig } from 'vite'
import BuntpapierStylus from 'buntpapier/stylus.js'
import vue from './plugin-vue.js'
const stylusOptions = {
paths: [
// stylus does not allow for dynamic resolves, so we just list all paths here and hope it won't explode
path.resolve(__dirname, './src/styles'),
'node_modules'
],
use: [BuntpapierStylus({implicit: false})],
imports: ['buntpapier/buntpapier/index.styl', `${path.resolve(__dirname, './src/styles/variables.styl')}`]
}
export default defineConfig({
plugins: [vue({
reactivityTransform: true,
})],
css: {
preprocessorOptions: {
stylus: stylusOptions,
styl: stylusOptions
}
},
build: {
target: 'esnext'
},
resolve: {
mainFields: ['browser', 'module', 'jsnext:main', 'jsnext'],
extensions: ['.js', '.json', '.vue'],
alias: [
{find: 'lodash', replacement: 'lodash-es'},
{find: '~', replacement: path.resolve(__dirname, './src')},
],
},
})