-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
48 lines (47 loc) · 1.51 KB
/
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
42
43
44
45
46
47
48
import { defineConfig } from 'vite';
import HublPostCSSCleaner from './build/rollup-plugin-hubl-cleaner';
import HublParser from '@spingroup/postcss-hubl/hubl-parse';
import discardDuplicates from 'postcss-discard-duplicates';
import nesting from 'postcss-nesting';
import postcssPresetEnv from 'postcss-preset-env';
import postcssImport from 'postcss-import';
export default defineConfig({
plugins: [HublPostCSSCleaner()],
publicDir: './dist/',
build: {
outDir: './src/unified-theme/assets/dist',
minify: false,
rollupOptions: {
watch: {
include: ['./src/unified-theme/assets/_hs/css/**/*'],
},
input: {
main: './src/unified-theme/assets/_hs/css/main.hubl.css',
caseStudies: './src/unified-theme/assets/_hs/css/templates/case-studies.hubl.css',
system: './src/unified-theme/assets/_hs/css/templates/system.hubl.css',
blog: './src/unified-theme/assets/_hs/css/templates/blog.hubl.css',
podcastListing: './src/unified-theme/assets/_hs/css/templates/podcast-listing.hubl.css',
podcastDetail: './src/unified-theme/assets/_hs/css/templates/podcast-detail.hubl.css',
},
output: {
assetFileNames: 'css/[name].[ext]',
},
},
},
css: {
postcss: {
parser: HublParser,
plugins: [
postcssImport(),
discardDuplicates(),
nesting(),
postcssPresetEnv({
stage: 3,
features: {
'custom-properties': false,
},
}),
],
},
},
});