code-server-2/packages/server/webpack.config.js

32 lines
729 B
JavaScript
Raw Normal View History

const path = require("path");
const webpack = require("webpack");
const merge = require("webpack-merge");
module.exports = merge({
devtool: "none",
2019-02-06 18:05:48 +00:00
mode: "development",
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
},
2019-02-22 01:32:08 +00:00
externals: ["tslib", "trash"],
entry: "./packages/server/src/cli.ts",
target: "node",
plugins: [
new webpack.DefinePlugin({
"process.env.BUILD_DIR": `"${__dirname}"`,
"process.env.CLI": `"${process.env.CLI ? "true" : "false"}"`,
}),
],
2019-02-06 18:05:48 +00:00
}, require("../../scripts/webpack.general.config")());