mirror of
https://github.com/bitwarden/browser
synced 2024-12-18 20:33:00 +01:00
7cfa38e344
This PR wires up a polyfill for window.ipc which allows us to progressively migrate the codebase to a format which supports context bridge. This avoids a big bang effort where every non sandboxed call has to be migrated before we can run the code. Once all calls to node modules are removed from the renderer and only exists in preload.ts. We will turn on context isolation and use the context bridge for communication instead.
40 lines
835 B
JavaScript
40 lines
835 B
JavaScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
const concurrently = require("concurrently");
|
|
const rimraf = require("rimraf");
|
|
|
|
const args = process.argv.splice(2);
|
|
|
|
rimraf.sync("build");
|
|
|
|
concurrently(
|
|
[
|
|
{
|
|
name: "Main",
|
|
command: "npm run build:main:watch",
|
|
prefixColor: "yellow",
|
|
},
|
|
{
|
|
name: "Prel",
|
|
command: "npm run build:preload:watch",
|
|
prefixColor: "magenta",
|
|
},
|
|
{
|
|
name: "Rend",
|
|
command: "npm run build:renderer:watch",
|
|
prefixColor: "cyan",
|
|
},
|
|
{
|
|
name: "Elec",
|
|
command: `npx wait-on ./build/main.js && npx electron --inspect=5858 ${args.join(
|
|
" "
|
|
)} ./build --watch`,
|
|
prefixColor: "green",
|
|
},
|
|
],
|
|
{
|
|
prefix: "name",
|
|
outputStream: process.stdout,
|
|
killOthers: ["success", "failure"],
|
|
}
|
|
);
|