code-server/packages/server/webpack.config.js
Asher cc8c7e2cee Make assets unique (#518)
* Make all assets unique

All CSS and JavaScript files have unique names now. I also moved the
login to the /login path in order to ensure the HTML for each page is
also unique.

* Explicitly include assets to cache
2019-04-17 17:18:20 -05:00

36 lines
782 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"))({
dirname: __dirname,
}), {
output: {
filename: "cli.js",
libraryTarget: "commonjs",
},
node: {
console: false,
global: false,
process: false,
Buffer: false,
__filename: false,
__dirname: false,
setImmediate: false
},
externals: {
"nbin": "commonjs nbin",
},
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"}"`,
}),
],
},
);