/
stencil.config.ts
94 lines (90 loc) · 2.8 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import { Config } from '@stencil/core';
import { sass } from '@stencil/sass';
import { angularOutputTarget } from '@stencil/angular-output-target';
import { reactOutputTarget } from '@stencil/react-output-target';
import { vueOutputTarget } from '@stencil/vue-output-target';
import { svelteOutputTarget } from '@stencil/svelte-output-target';
const componentCorePackage = '@revolist/revogrid';
const parent = '../revogrid-proxy';
const entry = 'revogrid.ts';
const directivesProxyFile = (name: string, filepath = entry) => `${parent}/${name}/src/${filepath}`;
export const config: Config = {
// https://github.com/ionic-team/stencil/blob/master/src/declarations/stencil-public-compiler.ts
enableCache: true,
hashFileNames: false,
autoprefixCss: false,
minifyCss: true,
preamble: 'Built by Revolist',
hashedFileNameLength: 8,
extras: {
// We need the following for IE11 and old Edge:
cssVarsShim: true,
dynamicImportShim: true,
// We don’t use shadow DOM so this is not needed:
shadowDomShim: false,
// Setting the below option to “true” will actually break Safari 10 support:
safari10: false,
// This is to tackle an Angular specific performance issue:
initializeNextTick: true,
// Don’t need any of these so setting them to “false”:
scriptDataOpts: false,
appendChildSlotFix: false,
cloneNodeFix: false,
slotChildNodesFix: false,
experimentalImportInjection: true,
},
buildEs5: 'prod',
namespace: 'revo-grid',
taskQueue: 'async',
globalScript: './src/global/global.ts',
plugins: [
sass({
injectGlobalPaths: ['src/global/_colors.scss', 'src/global/_icons.scss', 'src/global/_mixins.scss', 'src/global/_buttons.scss'],
}),
],
// proxies
outputTargets: [
angularOutputTarget({
componentCorePackage,
directivesProxyFile: directivesProxyFile('angular', `proxies/${entry}`),
valueAccessorConfigs: [],
}),
reactOutputTarget({
componentCorePackage,
proxiesFile: directivesProxyFile('react'),
}),
vueOutputTarget({
componentCorePackage,
proxiesFile: directivesProxyFile('vue'),
includeDefineCustomElements: true,
componentModels: [],
}),
svelteOutputTarget({
componentCorePackage,
proxiesFile: directivesProxyFile('svelte'),
includeDefineCustomElements: true,
legacy: false,
includePolyfills: false,
}),
// custom element, no polifil
{
type: 'dist-custom-elements',
dir: 'custom-element',
autoDefineCustomElements: true,
empty: true,
},
// lazy loading
{
type: 'dist',
esmLoaderPath: '../loader',
},
{
type: 'docs-readme',
},
{
type: 'www',
copy: [{ src: 'utilsExternal' }],
serviceWorker: null, // disable service workers
},
],
};