-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstencil.config.ts
66 lines (63 loc) · 1.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
import { Config } from '@stencil/core';
import { reactOutputTarget } from '@stencil/react-output-target';
import { vueOutputTarget } from '@stencil/vue-output-target';
import workers from '@vertexvis/rollup-plugin-web-workers';
import commonjs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
import typescript2 from 'rollup-plugin-typescript2';
import jestConfig from './jest-shared.config';
export const config: Config = {
namespace: 'viewer',
sourceMap: true,
nodeResolve: { browser: true },
preamble: copyright(),
plugins: [
workers({
plugins: [
commonjs(),
resolve({ browser: true }),
typescript2(),
terser(),
],
}),
],
globalScript: 'src/polyfill/resize-observer.ts',
globalStyle: 'src/css/global.css',
outputTargets: [
reactOutputTarget({
componentCorePackage: '@vertexvis/viewer',
proxiesFile: '../viewer-react/src/generated/components.ts',
excludeComponents: [
// Omitted because the React scene tree component doesn't support
// rendering a row as a React element.
'vertex-scene-tree-row',
],
}),
vueOutputTarget({
componentCorePackage: '@vertexvis/viewer',
proxiesFile: '../viewer-vue/src/generated/components.ts',
}),
{
type: 'dist',
esmLoaderPath: '../loader',
},
{
type: 'dist-custom-elements',
autoDefineCustomElements: true,
minify: true,
},
{
type: 'docs-readme',
},
],
testing: { ...jestConfig },
extras: {
dynamicImportShim: true,
shadowDomShim: true,
},
};
function copyright(): string {
const year = new Date(Date.now()).getFullYear();
return `Copyright (c) ${year} Vertex Software LLC. All rights reserved.`;
}