# HG changeset patch # User drewp@bigasterisk.com # Date 1581490524 28800 # Node ID ea9c9db282d6f35f8afdb1c99d4452d1ce28652d # Parent 0ffe5591b0484b8bc4584a71e9fe03dd46ece827 automate 'external' list, get all local code to appear in lib.bundle.js diff -r 0ffe5591b048 -r ea9c9db282d6 rollup.config.js --- a/rollup.config.js Tue Feb 11 22:54:47 2020 -0800 +++ b/rollup.config.js Tue Feb 11 22:55:24 2020 -0800 @@ -12,6 +12,14 @@ } }; +const moduleIsntLocal = (id, parentId, isResolved) => { + console.log("check", id, !id.startsWith("./")); + if (isResolved || id == "src/index.ts") { + return false; + } + return !id.startsWith("./"); +}; + export default [ { input: "src/index.ts", @@ -20,19 +28,12 @@ format: "esm", intro: `const ${workaround_some_browser_detector}, ${workaround_jsonld_module_system_picker};` }, - external: [ - "@polymer/polymer", - "lit-html", - "@polymer/decorators", - "n3", - "jsonld" - ], + external: moduleIsntLocal, plugins: [ builtins(), resolve({ extensions: [".js", ".ts"], browser: true, - resolveOnly: ["streamed-graph"] }), typescript(), postcss({