mirror of
https://github.com/coder/code-server.git
synced 2024-12-22 01:01:31 +03:00
994531d8bb
* Add task for packaging release * Modify package task to package a single binary This is so it can be used as part of the build/release script. * Package release as part of Travis deploy * Set platform env var * Add arch env var * Make version available to the code * Use tar for Linux and zip for Mac & Windows
40 lines
877 B
JavaScript
40 lines
877 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"}"`,
|
|
}),
|
|
],
|
|
},
|
|
);
|