mirror of
https://github.com/coder/code-server.git
synced 2025-07-30 05:22:04 +08:00
Fix extra CSS being included on the client
This commit is contained in:
@ -2,30 +2,33 @@ 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",
|
||||
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
|
||||
},
|
||||
externals: ["tslib", "trash"],
|
||||
entry: "./packages/server/src/cli.ts",
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.BUILD_DIR": `"${__dirname}"`,
|
||||
"process.env.CLI": `"${process.env.CLI ? "true" : "false"}"`,
|
||||
}),
|
||||
],
|
||||
},
|
||||
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")());
|
||||
);
|
||||
|
Reference in New Issue
Block a user