code-server/packages/server/webpack.config.js
Asher aabb2ecda7
Update node to 10.15.1 (#472)
* Update Node to 10.15.1

* Remove string replace that was used for oclif

* Update nbin

* Package node-pty and spdlog with nbin

* Label stderr/stdout from shared process

* Remove fork override

* Prevent "already disposed" errors when trying to kill disposed proxies

* Include spdlog dependencies

* Shim /node_modules

* Add node_modules to Docker ignore

It keeps using my already-built .node files which results in a
mismatching GLIBC version error.

* Update nbin
2019-04-15 19:48:12 -05:00

37 lines
819 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
},
externals: {
"nbin": "commonjs nbin",
},
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"}"`,
}),
],
},
);