-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstencil.config.ts
57 lines (51 loc) · 1.18 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
55
56
57
import { Config } from '@stencil/core';
import { sass } from '@stencil/sass';
// Postcss
import { postcss } from '@stencil/postcss';
import autoprefixer from 'autoprefixer';
import pxtorem from 'postcss-pxtorem';
import url from 'postcss-url';
const inlineOptions = {
url: 'inline'
};
// https://www.npmjs.com/package/node-sass
const nodeSassConfig: any = {};
// https://github.com/postcss/autoprefixer
const autoprefixerConfig: any = {
cascade: true,
grid: 'autoplace'
};
// https://github.com/cuth/postcss-pxtorem
const pxtoremOptions: any = {
rootValue: 16,
unitPrecision: 5,
propList: ['*'],
selectorBlackList: [],
replace: true,
mediaQuery: true,
minPixelValue: 1
};
export const config: Config = {
namespace: 'web-component-lib',
outputTargets: [
{
type: 'dist',
esmLoaderPath: '../loader'
},
{
type: 'docs-readme'
},
{
type: 'www',
serviceWorker: null // disable service workers
}
],
globalStyle: 'src/global/scss/index.scss',
globalScript: 'src/global/js/app.ts',
plugins: [
sass(nodeSassConfig),
postcss({
plugins: [autoprefixer(autoprefixerConfig), pxtorem(pxtoremOptions)]
})
]
};