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