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