Mercurial > code > home > repos > streamed-graph
diff 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 |
line wrap: on
line diff
--- a/rollup.config.js Wed Jan 01 12:55:35 2020 -0800 +++ b/rollup.config.js Wed Jan 01 19:39:57 2020 -0800 @@ -2,19 +2,24 @@ import commonjs from '@rollup/plugin-commonjs'; import resolve from "@rollup/plugin-node-resolve"; import typescript from "rollup-plugin-typescript2"; +import replace from '@rollup/plugin-replace'; export default { input: "src/index.ts", output: { file: "build/bundle.js", - format: "esm", - intro: "const global = window;" + format: "cjs", // just for the namedExports hack + intro: "const global = window;", + }, + // only for final build. demo page does need these modules, so I guess this file should observe some kind of build mode. + external: ['@polymer/polymer','lit-html','@polymer/decorators','n3','jsonld'], plugins: [ builtins(), resolve({ extensions: [".js", ".ts"], - browser: true + browser: true, + only: ['streamed-graph'] }), typescript(), commonjs({ @@ -22,5 +27,6 @@ 'jsonld': ['expand'], // fixes "expand is not exported by node_modules/jsonld/lib/index.js" } }), + ] };