Mercurial > code > home > repos > streamed-graph
annotate rollup.config.js @ 47:7d17a02b5ae0
reformats and minor edits
author | drewp@bigasterisk.com |
---|---|
date | Mon, 06 Jan 2020 23:52:30 -0800 |
parents | 2a48e13bafea |
children | b8e5850acca0 |
rev | line source |
---|---|
35 | 1 import builtins from "rollup-plugin-node-builtins"; |
47 | 2 import commonjs from "@rollup/plugin-commonjs"; |
34 | 3 import resolve from "@rollup/plugin-node-resolve"; |
4 import typescript from "rollup-plugin-typescript2"; | |
5 | |
6 export default { | |
35 | 7 input: "src/index.ts", |
8 output: { | |
9 file: "build/bundle.js", | |
42
895ae7c5b0f4
don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents:
35
diff
changeset
|
10 format: "cjs", // just for the namedExports hack |
895ae7c5b0f4
don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents:
35
diff
changeset
|
11 intro: "const global = window;", |
895ae7c5b0f4
don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents:
35
diff
changeset
|
12 |
35 | 13 }, |
42
895ae7c5b0f4
don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents:
35
diff
changeset
|
14 // only for final build. demo page does need these modules, so I guess this file should observe some kind of build mode. |
895ae7c5b0f4
don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents:
35
diff
changeset
|
15 external: ['@polymer/polymer','lit-html','@polymer/decorators','n3','jsonld'], |
35 | 16 plugins: [ |
17 builtins(), | |
18 resolve({ | |
19 extensions: [".js", ".ts"], | |
42
895ae7c5b0f4
don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents:
35
diff
changeset
|
20 browser: true, |
895ae7c5b0f4
don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents:
35
diff
changeset
|
21 only: ['streamed-graph'] |
35 | 22 }), |
23 typescript(), | |
24 commonjs({ | |
25 namedExports: { | |
26 'jsonld': ['expand'], // fixes "expand is not exported by node_modules/jsonld/lib/index.js" | |
27 } | |
28 }), | |
42
895ae7c5b0f4
don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents:
35
diff
changeset
|
29 |
35 | 30 ] |
34 | 31 }; |