Hook up shared process sorta

This commit is contained in:
Asher
2019-01-18 18:04:24 -06:00
committed by Kyle Carberry
parent d827015b40
commit 811260cc80
15 changed files with 198 additions and 246 deletions

View File

@ -44,37 +44,6 @@ module.exports = (env) => {
},
],
},
}, {
loader: "string-replace-loader",
test: /vs\/loader\.js/,
options: {
multiple: [
{
search: "var recorder = moduleManager.getRecorder\\(\\);",
replace: `
var recorder = moduleManager.getRecorder();
const context = require.context("../", true, /.*/);
if (scriptSrc.indexOf("file:///") !== -1) {
const vsSrc = scriptSrc.split("file:///")[1].split(".js")[0];
if (vsSrc && vsSrc.startsWith("vs/")) {
scriptSrc = \`node|./\${vsSrc}\`;
}
}
`,
flags: "g",
},
{
search: "nodeRequire\\(",
replace: "require(",
flags: "g",
},
{
search: "moduleExports_1 = require\\(",
replace: "moduleExports_1 = context(",
flags: "g",
},
],
},
}, {
test: /\.wasm$/,
type: "javascript/auto",
@ -120,4 +89,4 @@ if (scriptSrc.indexOf("file:///") !== -1) {
}),
],
});
};
};