-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstencil.config.ts
51 lines (49 loc) · 1.79 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
import { Config } from "@stencil/core";
import { sass } from "@stencil/sass";
/**
* NOTE ABOUT STENCIL VERSION:
* This project is pinned to @stencil/core version 4.10.0. This is because the next minor version
* (4.11.0) made upgrades to the underlying Rollup infrastructure (https://github.com/ionic-team/stencil/pull/5274)
* that are not compatible with our dependencies.
*
* Specifically, we use `cytoscape-dagre` (https://github.com/cytoscape/cytoscape.js-dagre), which
* depends on `dagre` version 0.8.5 (https://github.com/dagrejs/dagre). This version of `dagre` uses
* conditional requires of `lodash` (https://github.com/dagrejs/dagre/blob/v0.8.5/lib/lodash.js)
* which are not compatible with ESM (https://github.com/rollup/rollup-plugin-commonjs/issues/424#issuecomment-559081023).
* There are newer versions of `dagre` that might not suffer from the same issue, but
* `cytoscape-dagre` doesn't seem to have a lot of interest in properly supporting ESM:
* - https://github.com/cytoscape/cytoscape.js-dagre/issues/123
* - https://github.com/cytoscape/cytoscape.js-dagre/issues/120
* - https://github.com/cytoscape/cytoscape.js-dagre/issues/110
*/
export const config: Config = {
namespace: "web-components",
plugins: [sass()],
buildEs5: "prod",
outputTargets: [
{
type: "dist",
esmLoaderPath: "../loader",
},
{
type: "dist-custom-elements",
customElementsExportBehavior: "auto-define-custom-elements",
externalRuntime: false,
generateTypeDeclarations: true,
},
{
type: "docs-readme",
},
{
type: "www",
serviceWorker: null, // disable service workers
copy: [{ src: "**/*.html" }, { src: "*.css" }],
},
],
testing: {
browserHeadless: "new",
},
extras: {
enableImportInjection: true,
},
};