-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathstencil.config.ts
69 lines (68 loc) · 1.84 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
import autoprefixer from 'autoprefixer';
import { Config } from '@stencil/core';
import { sass } from '@stencil/sass';
import { postcss } from '@stencil-community/postcss';
import tailwindcss from 'tailwindcss';
import tailwindConfig from './tailwind.config';
import { generatePreactTypes } from './support/preact';
import resolvePkg from 'resolve-pkg';
import { makeArcgisExternal, makeCalciteExternal } from './src/utils/makeExternal';
export const config: Config = {
namespace: 'solutions-components',
globalStyle: 'src/assets/styles/styles.scss',
minifyJs: true,
minifyCss: true,
sourceMap: false,
outputTargets: [
{
type: 'dist',
copy: [
{ src: 'assets', dest: 'assets' },
{ src: 'demos', dest: 'demos' },
{ src: 'utils', dest: 'utils' },
{
src: resolvePkg('@esri/calcite-components/dist/calcite') ?? '',
dest: 'vendor/calcite-components',
},
],
},
{
type: 'docs-readme'
},
{
type: 'custom',
name: 'preact',
generator: generatePreactTypes
},
{
type: 'dist-custom-elements',
customElementsExportBehavior: 'auto-define-custom-elements'
},
],
testing: {
browserHeadless: 'new',
testPathIgnorePatterns: [
'dist/',
'placeholder_tests'
],
transform: {
'^.+\\.[jt]sx?$': '<rootDir>/node_modules/@stencil/core/testing/jest-preprocessor.js'
}
},
plugins: [
sass({
injectGlobalPaths: ['src/assets/styles/includes.scss']
}),
postcss({
plugins: [
tailwindcss(tailwindConfig),
autoprefixer()
]
})
],
rollupPlugins: {
before: [makeArcgisExternal(), makeCalciteExternal()],
after: [],
},
preamble: 'Copyright 2022 Esri\nLicensed under the Apache License, Version 2.0\nhttp://www.apache.org/licenses/LICENSE-2.0'
};