2019-01-26 01:18:21 +01:00
|
|
|
const path = require("path");
|
2019-01-18 22:46:40 +01:00
|
|
|
const merge = require("webpack-merge");
|
|
|
|
|
2019-02-26 18:07:00 +01:00
|
|
|
const root = path.resolve(__dirname, "../..");
|
|
|
|
const fills = path.join(root, "packages/ide/src/fill");
|
|
|
|
const vsFills = path.join(root, "packages/vscode/src/fill");
|
|
|
|
|
|
|
|
module.exports = merge(
|
|
|
|
require(path.join(root, "scripts/webpack.client.config.js"))({
|
|
|
|
entry: path.join(root, "packages/web/src/index.ts"),
|
|
|
|
template: path.join(root, "packages/web/src/index.html"),
|
|
|
|
typescriptCompilerOptions: {
|
|
|
|
"target": "es5",
|
|
|
|
"lib": ["dom", "esnext"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
), {
|
2019-01-26 01:18:21 +01:00
|
|
|
output: {
|
2019-02-26 18:07:00 +01:00
|
|
|
chunkFilename: "[name]-[hash:6].bundle.js",
|
2019-01-26 01:18:21 +01:00
|
|
|
path: path.join(__dirname, "out"),
|
2019-02-26 18:07:00 +01:00
|
|
|
filename: "[hash:6].bundle.js",
|
|
|
|
},
|
|
|
|
node: {
|
|
|
|
module: "empty",
|
|
|
|
crypto: "empty",
|
|
|
|
tls: "empty",
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
"gc-signals": path.join(fills, "empty.ts"),
|
|
|
|
"selenium-webdriver": path.join(fills, "empty.ts"),
|
|
|
|
"vscode": path.join(fills, "empty.ts"),
|
|
|
|
"vscode-fsevents": path.join(fills, "empty.ts"),
|
2019-03-08 17:37:03 +01:00
|
|
|
"vscode-windows-registry": path.resolve(fills, "empty.ts"),
|
2019-02-26 18:07:00 +01:00
|
|
|
"vsda": path.join(fills, "empty.ts"),
|
|
|
|
"windows-foreground-love": path.join(fills, "empty.ts"),
|
|
|
|
"windows-mutex": path.join(fills, "empty.ts"),
|
|
|
|
"windows-process-tree": path.join(fills, "empty.ts"),
|
|
|
|
"vscode-sqlite3": path.join(fills, "empty.ts"),
|
|
|
|
"tls": path.join(fills, "empty.ts"),
|
|
|
|
"native-is-elevated": path.join(fills, "empty.ts"),
|
|
|
|
"dns": path.join(fills, "empty.ts"),
|
|
|
|
"console": path.join(fills, "empty.ts"),
|
|
|
|
"readline": path.join(fills, "empty.ts"),
|
|
|
|
"oniguruma": path.join(fills, "empty.ts"),
|
|
|
|
|
|
|
|
// Webpack includes path-browserify but not the latest version, so
|
|
|
|
// path.posix and path.parse are undefined (among other things possibly).
|
|
|
|
// Also if we don't provide the full path, the code in vscode will import
|
|
|
|
// from vscode's node_modules which is the wrong version.
|
2019-02-28 21:04:19 +01:00
|
|
|
"path": path.join(fills, "path.js"),
|
2019-02-26 18:07:00 +01:00
|
|
|
"crypto": "crypto-browserify",
|
|
|
|
"http": "http-browserify",
|
|
|
|
|
|
|
|
"child_process": path.join(fills, "child_process.ts"),
|
|
|
|
"os": path.join(fills, "os.ts"),
|
|
|
|
"fs": path.join(fills, "fs.ts"),
|
|
|
|
"net": path.join(fills, "net.ts"),
|
|
|
|
"util": path.join(fills, "util.ts"),
|
2019-03-26 19:01:25 +01:00
|
|
|
"trash": path.join(fills, "trash.ts"),
|
2019-02-26 18:07:00 +01:00
|
|
|
"electron": path.join(fills, "electron.ts"),
|
|
|
|
|
|
|
|
"native-keymap": path.join(vsFills, "native-keymap.ts"),
|
|
|
|
"node-pty": path.join(vsFills, "node-pty.ts"),
|
|
|
|
"graceful-fs": path.join(vsFills, "graceful-fs.ts"),
|
|
|
|
"spdlog": path.join(vsFills, "spdlog.ts"),
|
|
|
|
"native-watchdog": path.join(vsFills, "native-watchdog.ts"),
|
|
|
|
"iconv-lite": path.join(vsFills, "iconv-lite.ts"),
|
|
|
|
|
2019-03-08 17:37:03 +01:00
|
|
|
// This seems to be in the wrong place?
|
|
|
|
"vs/workbench/contrib/codeEditor/electron-browser/media/WordWrap_16x.svg": "vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/WordWrap_16x.svg",
|
|
|
|
|
2019-02-26 18:07:00 +01:00
|
|
|
"vs/base/node/paths": path.join(vsFills, "paths.ts"),
|
|
|
|
"vs/base/common/amd": path.join(vsFills, "amd.ts"),
|
2019-03-08 17:37:03 +01:00
|
|
|
"vs/platform/product/node/package": path.resolve(vsFills, "package.ts"),
|
|
|
|
"vs/platform/product/node/product": path.resolve(vsFills, "product.ts"),
|
|
|
|
"vs/base/node/zip": path.resolve(vsFills, "zip.ts"),
|
2019-03-21 20:04:09 +01:00
|
|
|
"vszip": path.resolve(root, "lib/vscode/src/vs/base/node/zip.ts"),
|
2019-02-26 18:07:00 +01:00
|
|
|
"vs": path.join(root, "lib", "vscode", "src", "vs"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
resolveLoader: {
|
|
|
|
alias: {
|
|
|
|
"vs/css": path.join(vsFills, "css.js"),
|
|
|
|
},
|
2019-01-26 01:18:21 +01:00
|
|
|
},
|
2019-01-18 22:46:40 +01:00
|
|
|
});
|