Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/packages/server/webpack.config.js
Kyle Carberry e8174095ca
Add windows support (#41)
* Add windows support

* Improve multi-platform support

* Install with network-concurrency 1

* Use file-glob to upload windows binary

* Don't install packages in parallel if on windows

* Rename vscode-remote to code-server

* Add output at intervals so CI doesn't kill build

* Update all tasks to provide timed output

* Don't perform tasks sync otherwise we can't log
2019-02-28 14:04:19 -06:00

40 lines
878 B
JavaScript

const path = require("path");
const webpack = require("webpack");
const merge = require("webpack-merge");
const root = path.resolve(__dirname, "../..");
module.exports = merge(
require(path.join(root, "scripts/webpack.node.config.js"))({
// Config options.
}), {
output: {
filename: "cli.js",
path: path.join(__dirname, "out"),
libraryTarget: "commonjs",
},
node: {
console: false,
global: false,
process: false,
Buffer: false,
__filename: false,
__dirname: false,
setImmediate: false
},
resolve: {
alias: {
"node-pty": "node-pty-prebuilt",
},
},
externals: ["tslib", "trash"],
entry: "./packages/server/src/cli.ts",
plugins: [
new webpack.DefinePlugin({
"process.env.BUILD_DIR": `"${__dirname.replace(/\\/g, "\\\\")}"`,
"process.env.CLI": `"${process.env.CLI ? "true" : "false"}"`,
}),
],
},
);