-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.js
45 lines (44 loc) · 1.1 KB
/
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
38
39
40
41
42
43
44
45
import path from 'path'
import alias from '@rollup/plugin-alias'
import PostCSS from 'rollup-plugin-postcss'
import resolve from '@rollup/plugin-node-resolve'
export default {
entry: path.resolve(__dirname, '../src/index.js'),
plugins: {
alias: [
alias({
entries: [
{
find: '@',
replacement: `${path.resolve(__dirname, '../src')}`
}
],
customResolver: resolve({
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue']
})
})
],
postcss: [
PostCSS({
include: /(?<!&module=.*)\.css$/,
plugins: [
require('postcss-import'),
require('postcss-nested'),
require('tailwindcss'),
require('autoprefixer'),
require('postcss-replace')({
pattern: /(--tw|\*, ::before, ::after)/g,
data: {
'--tw': '--va-tw',
'*, ::before, ::after': ':root'
}
})
]
})
],
babel: {
exclude: 'node_modules/**',
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue']
}
}
}