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 0c2c957312 Fix readdir for root path (#35)
* Fix readdir for root path

* Fix merge of webpack conf

* Fix travis.yml to deploy on master

* Remove windows platform from travis.yml

* Enable caching

* mkdirpSync

* Fix build script
2019-02-25 16:29:34 -06:00

32 lines
728 B
JavaScript

const path = require("path");
const webpack = require("webpack");
const merge = require("webpack-merge");
module.exports = merge({
devtool: "none",
mode: "production",
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: ["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"}"`,
}),
],
}, require("../../scripts/webpack.general.config")());