1
0
mirror of https://github.com/coder/code-server.git synced 2024-12-05 07:13:06 +08:00
code-server/packages/app/browser/webpack.config.js

25 lines
772 B
JavaScript
Raw Normal View History

const path = require("path");
const webpack = require("webpack");
const merge = require("webpack-merge");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const prod = process.env.NODE_ENV === "production";
module.exports = merge(require(path.join(__dirname, "../../../scripts", "webpack.general.config.js"))(), {
devtool: prod ? "source-map" : "cheap-module-eval-source-map",
mode: prod ? "production" : "development",
output: {
path: path.join(__dirname, "out"),
},
entry: [
"webpack-hot-middleware/client?reload=true&quiet=true",
"./packages/app/browser/src/app.ts"
],
plugins: [
new HtmlWebpackPlugin({
template: "packages/app/browser/src/app.html",
}),
new webpack.HotModuleReplacementPlugin(),
// new BundleAnalyzerPlugin(),
]
});