@vizhub/runtime 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.computeBundleJSV2 = void 0;
|
4
|
-
const
|
5
|
-
const
|
6
|
-
const
|
4
|
+
const virtualFileSystem_js_1 = require("../common/virtualFileSystem.js");
|
5
|
+
const sucrasePlugin_js_1 = require("../common/sucrasePlugin.js");
|
6
|
+
const packageJson_js_1 = require("../common/packageJson.js");
|
7
7
|
const computeBundleJSV2 = async ({ files, rollup, enableSourcemap = true, }) => {
|
8
8
|
const indexJSContent = files["index.js"];
|
9
9
|
if (!indexJSContent) {
|
@@ -11,7 +11,7 @@ const computeBundleJSV2 = async ({ files, rollup, enableSourcemap = true, }) =>
|
|
11
11
|
}
|
12
12
|
const inputOptions = {
|
13
13
|
input: "./index.js",
|
14
|
-
plugins: [(0,
|
14
|
+
plugins: [(0, virtualFileSystem_js_1.virtualFileSystem)(files), (0, sucrasePlugin_js_1.sucrasePlugin)()],
|
15
15
|
onwarn(warning, warn) {
|
16
16
|
// Suppress "treating module as external dependency" warnings
|
17
17
|
if (warning.code === "UNRESOLVED_IMPORT")
|
@@ -20,8 +20,8 @@ const computeBundleJSV2 = async ({ files, rollup, enableSourcemap = true, }) =>
|
|
20
20
|
},
|
21
21
|
};
|
22
22
|
const bundle = await rollup(inputOptions);
|
23
|
-
const pkg = (0,
|
24
|
-
const globals = (0,
|
23
|
+
const pkg = (0, packageJson_js_1.packageJSON)(files);
|
24
|
+
const globals = (0, packageJson_js_1.getGlobals)(pkg);
|
25
25
|
const outputOptions = {
|
26
26
|
format: "iife",
|
27
27
|
globals,
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { virtualFileSystem } from "../common/virtualFileSystem";
|
2
|
-
import { sucrasePlugin } from "../common/sucrasePlugin";
|
3
|
-
import { getGlobals, packageJSON, } from "../common/packageJson";
|
1
|
+
import { virtualFileSystem } from "../common/virtualFileSystem.js";
|
2
|
+
import { sucrasePlugin } from "../common/sucrasePlugin.js";
|
3
|
+
import { getGlobals, packageJSON, } from "../common/packageJson.js";
|
4
4
|
export const computeBundleJSV2 = async ({ files, rollup, enableSourcemap = true, }) => {
|
5
5
|
const indexJSContent = files["index.js"];
|
6
6
|
if (!indexJSContent) {
|