comparison service/wifi/rollup.config.js @ 684:b39d24617a85

fixes for streamedgraph build and a surprise with multi-value wifiBands Ignore-this: eea822327a0c66c4462ffd7c404079e5
author drewp@bigasterisk.com
date Thu, 09 Jan 2020 00:38:59 -0800
parents 2b9865bf1737
children b267511ec4fc
comparison
equal deleted inserted replaced
683:50d66febeeb0 684:b39d24617a85
4 import typescript from "rollup-plugin-typescript2"; 4 import typescript from "rollup-plugin-typescript2";
5 import replace from "@rollup/plugin-replace"; 5 import replace from "@rollup/plugin-replace";
6 6
7 const workaround_jsonld_module_system_picker = "process = {version: '1.0.0'}"; 7 const workaround_jsonld_module_system_picker = "process = {version: '1.0.0'}";
8 const workaround_some_browser_detector = "global = window"; 8 const workaround_some_browser_detector = "global = window";
9 const workaround_jsonld_expand_issue = {
10 namedExports: {
11 jsonld: ["expand"], // fixes "expand is not exported by node_modules/jsonld/lib/index.js"
12 '../../../streamed-graph/node_modules/jsonld/lib/index': ['expand'],
13 }
14 };
9 15
10 // This makes <dom-module> element totally unavailable. I only meant to prune one of the 16 // This makes <dom-module> element totally unavailable. I only meant to prune one of the
11 // two, but of course why is streamed-graph's node_modules/**/dom-module.js file getting 17 // two, but of course why is streamed-graph's node_modules/**/dom-module.js file getting
12 // here in the first place? 18 // here in the first place?
13 const duplicated_line_i_cant_prune = 19 const duplicated_line_i_cant_prune =
30 resolve({ 36 resolve({
31 extensions: [".js", ".ts"], 37 extensions: [".js", ".ts"],
32 browser: true, 38 browser: true,
33 }), 39 }),
34 typescript(), 40 typescript(),
35 commonjs({ 41 commonjs(workaround_jsonld_expand_issue),
36 namedExports: {
37 jsonld: ["expand"], // fixes "expand is not exported by node_modules/jsonld/lib/index.js"
38 },
39 }),
40 replace({ ...replacements, delimiters: ["", ""] }), 42 replace({ ...replacements, delimiters: ["", ""] }),
41 ], 43 ],
42 }; 44 };