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

36 lines
782 B
JavaScript
Raw Normal View History

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"))({
dirname: __dirname,
}), {
output: {
filename: "cli.js",
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"}"`,
}),
],
},
);