annotate service/wifi/rollup.config.js @ 674:2b9865bf1737

streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though Ignore-this: afcf4436ac3d7b88c0d7fc88de81d8e4
author drewp@bigasterisk.com
date Thu, 02 Jan 2020 00:23:36 -0800
parents f2215949c0c9
children b39d24617a85
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
673
f2215949c0c9 build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff changeset
1 import builtins from "rollup-plugin-node-builtins";
674
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
2 import commonjs from "@rollup/plugin-commonjs";
673
f2215949c0c9 build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff changeset
3 import resolve from "@rollup/plugin-node-resolve";
f2215949c0c9 build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff changeset
4 import typescript from "rollup-plugin-typescript2";
674
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
5 import replace from "@rollup/plugin-replace";
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
6
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
7 const workaround_jsonld_module_system_picker = "process = {version: '1.0.0'}";
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
8 const workaround_some_browser_detector = "global = window";
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
9
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
10 // This makes <dom-module> element totally unavailable. I only meant to prune one of the
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
11 // two, but of course why is streamed-graph's node_modules/**/dom-module.js file getting
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
12 // here in the first place?
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
13 const duplicated_line_i_cant_prune =
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
14 "customElements.define('dom-module', DomModule);";
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
15 const replacements = {};
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
16 replacements[duplicated_line_i_cant_prune] = "";
673
f2215949c0c9 build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff changeset
17
f2215949c0c9 build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff changeset
18 export default {
674
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
19 input: "src/index.ts",
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
20 output: {
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
21 file: "build/bundle.js",
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
22 format: "esm",
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
23 intro: `const ${workaround_some_browser_detector}, ${workaround_jsonld_module_system_picker};`,
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
24 },
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
25 external: [
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
26 "dom-module", // don't want two of these in the bundle
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
27 ],
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
28 plugins: [
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
29 builtins(),
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
30 resolve({
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
31 extensions: [".js", ".ts"],
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
32 browser: true,
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
33 }),
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
34 typescript(),
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
35 commonjs({
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
36 namedExports: {
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
37 jsonld: ["expand"], // fixes "expand is not exported by node_modules/jsonld/lib/index.js"
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
38 },
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
39 }),
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
40 replace({ ...replacements, delimiters: ["", ""] }),
2b9865bf1737 streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents: 673
diff changeset
41 ],
673
f2215949c0c9 build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff changeset
42 };