Convert backend code to ES modules
Bundling code now with Rollup for its flat bundling and tree shaking support. Front end code still goes through Webpack for browser support.
This commit is contained in:
1 parent
824639976f
commit
1e41c72d60
62 files changed
+718
-898
No files matched your search
+8
-10
@@ -18,15 +18,15 @@
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
const vm = require("vm");
|
||||
import vm from "vm";
|
||||
|
||||
const seedrandom = require("seedrandom");
|
||||
import seedrandom from "seedrandom";
|
||||
|
||||
const common = require("./common");
|
||||
const device = require("./device");
|
||||
const extensions = require("./extensions");
|
||||
const logger = require("./logger");
|
||||
const scheduling = require("./scheduling");
|
||||
import * as common from "./common";
|
||||
import * as device from "./device";
|
||||
import * as extensions from "./extensions";
|
||||
import * as logger from "./logger";
|
||||
import * as scheduling from "./scheduling";
|
||||
|
||||
// Used for throwing to exit user script and commit
|
||||
const COMMIT = Symbol();
|
||||
@@ -327,7 +327,7 @@ function errorToFault(err) {
|
||||
return fault;
|
||||
}
|
||||
|
||||
function run(
|
||||
export function run(
|
||||
script,
|
||||
globals,
|
||||
sessionContext,
|
||||
@@ -416,5 +416,3 @@ function run(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.run = run;
|
||||
Reference in new issue
Block a user