-
Notifications
You must be signed in to change notification settings - Fork 3
/
stencil.config.ts
54 lines (52 loc) · 1.41 KB
/
stencil.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
49
50
51
52
53
54
import { Config } from '@stencil/core'
import { sass } from '@stencil/sass'
import nodePolyfills from 'rollup-plugin-node-polyfills'
import tailwind, { tailwindHMR } from 'stencil-tailwind-plugin'
import tailwindcss from 'tailwindcss'
import { defaultExtractor } from 'tailwindcss/lib/lib/defaultExtractor'
import tailwindConf from './tailwind.config'
import purgecss from '@fullhuman/postcss-purgecss'
import autoprefixer from 'autoprefixer'
// https://stenciljs.com/docs/config
export const config: Config = {
enableCache: false,
buildEs5: 'prod',
extras: {
cssVarsShim: true,
dynamicImportShim: true,
shadowDomShim: true,
safari10: true,
scriptDataOpts: true,
appendChildSlotFix: false,
cloneNodeFix: false,
slotChildNodesFix: true,
},
outputTargets: [
{
type: 'www',
serviceWorker: null,
},
],
plugins: [
sass({ injectGlobalPaths: ['./src/styles/variables.scss', './src/styles/common.scss'] }),
tailwind({
tailwindConf,
tailwindCssPath: './src/styles/tailwind.scss',
postcss: {
plugins: [
tailwindcss(),
purgecss({
content: ['./**/*.tsx'],
safelist: [':root', ':host', ':shadow', '/deep/', '::part', '::theme'],
defaultExtractor,
}),
autoprefixer(),
],
},
}),
tailwindHMR(),
],
rollupPlugins: {
after: [nodePolyfills()],
},
}