forked from cds-snc/gcds-components
-
Notifications
You must be signed in to change notification settings - Fork 1
/
stencil.config.ts
64 lines (63 loc) · 1.99 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
import { Config } from '@stencil/core';
import { postcss } from '@stencil/postcss';
import { sass } from '@stencil/sass';
import { inlineSvg } from 'stencil-inline-svg';
import { reactOutputTarget } from '@stencil/react-output-target';
import { angularOutputTarget } from '@stencil/angular-output-target';
import { vueOutputTarget } from '@stencil/vue-output-target';
export const config: Config = {
namespace: 'gcds',
globalStyle:
'../../node_modules/@cdssnc/gcds-tokens/build/web/css/tokens.css',
srcDir: './src',
outputTargets: [
reactOutputTarget({
componentCorePackage: '@cdssnc/gcds-components',
proxiesFile: '../react/src/components/stencil-generated/index.ts',
includeDefineCustomElements: true,
}),
angularOutputTarget({
// outputType should be set to 'component' for Stencil projects using the dist output. Otherwise if using the custom elements output, outputType should be set to 'scam' or 'standalone'.
outputType: 'component',
componentCorePackage: '@cdssnc/gcds-components',
directivesProxyFile: '../angular/src/lib/stencil-generated/components.ts',
directivesArrayFile: '../angular/src/lib/stencil-generated/index.ts',
}),
vueOutputTarget({
componentCorePackage: '@cdssnc/gcds-components',
proxiesFile: '../vue/lib/components.ts',
}),
{
type: 'dist',
esmLoaderPath: '../loader',
isPrimaryPackageOutputTarget: true,
},
{
type: 'dist-custom-elements',
},
{
type: 'docs-readme',
},
{
type: 'dist-hydrate-script',
},
],
plugins: [
postcss({
plugins: [require('postcss-nested'), require('cssnano')],
}),
inlineSvg(),
sass(),
],
testing: {
transform: {
'^.+\\.(ts|tsx|js|jsx|css)$': '@stencil/core/testing/jest-preprocessor',
},
setupFiles: ['./src/utils/test/setupMock.js'],
},
validatePrimaryPackageOutputTarget: true,
extras: {
enableImportInjection: true,
experimentalSlotFixes: true
},
};