annotate rollup.config.js @ 38:d4036715028b

try exporting the PolymerElement so it can be depended on and therefore not culled by tree-shaking
author drewp@bigasterisk.com
date Sun, 29 Dec 2019 19:43:25 -0800
parents 29d8ed02a275
children 895ae7c5b0f4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
35
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
1 import builtins from "rollup-plugin-node-builtins";
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
2 import commonjs from '@rollup/plugin-commonjs';
34
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
3 import resolve from "@rollup/plugin-node-resolve";
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
4 import typescript from "rollup-plugin-typescript2";
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
5
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
6 export default {
35
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
7 input: "src/index.ts",
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
8 output: {
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
9 file: "build/bundle.js",
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
10 format: "esm",
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
11 intro: "const global = window;"
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
12 },
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
13 plugins: [
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
14 builtins(),
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
15 resolve({
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
16 extensions: [".js", ".ts"],
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
17 browser: true
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
18 }),
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
19 typescript(),
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
20 commonjs({
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
21 namedExports: {
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
22 'jsonld': ['expand'], // fixes "expand is not exported by node_modules/jsonld/lib/index.js"
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
23 }
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
24 }),
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
25 ]
34
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
26 };