-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstencil.config.ts
52 lines (50 loc) · 1.2 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
import { Config } from '@stencil/core';
import { postcss } from "@stencil/postcss";
import purgecss from '@fullhuman/postcss-purgecss';
import tailwindcss from 'tailwindcss';
import { stylus } from '@stencil/stylus';
// https://github.com/duetds/date-picker/blob/master/stencil.config.ts
const purge = purgecss({
content: ["./src/**/*.tsx", "./src/index.html"],
defaultExtractor: (content) => content.match(/[A-Za-z0-9-_:/]+/g) || [],
safelist: ['hidden'],
});
export const config: Config = {
namespace: 'stencil-starter',
minifyCss: true,
buildEs5: true,
outputTargets: [
{
type: 'dist',
esmLoaderPath: '../loader',
empty: true,
},
{
type: 'dist-custom-elements-bundle',
empty: true,
},
{
type: 'docs-readme',
},
{
type: 'www',
serviceWorker: null, // disable service workers
empty: true,
// copy: [
// { src: 'assets', dest: 'build/assets' }
// ],
},
],
globalStyle: 'src/global/styles.css',
plugins: [
stylus(),
postcss({
plugins: [
tailwindcss("./tailwind.config.js"),
...(process.env.NODE_ENV === "production"
? [purge]
: [])
]
})
]
};