mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 00:42:34 +00:00
parent
b7ec7ae311
commit
9c489680de
|
@ -3,7 +3,6 @@ const { resolve } = require("path");
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
const nodeExternals = require("webpack-node-externals");
|
const nodeExternals = require("webpack-node-externals");
|
||||||
const CopyPlugin = require("copy-webpack-plugin");
|
const CopyPlugin = require("copy-webpack-plugin");
|
||||||
const RunNodeWebpackPlugin = require("run-node-webpack-plugin");
|
|
||||||
const { ServiceWorkerPlugin } = require("service-worker-webpack");
|
const { ServiceWorkerPlugin } = require("service-worker-webpack");
|
||||||
|
|
||||||
const banner = `
|
const banner = `
|
||||||
|
@ -18,8 +17,6 @@ module.exports = (env, argv) => {
|
||||||
|
|
||||||
const base = {
|
const base = {
|
||||||
output: {
|
output: {
|
||||||
filename: "js/server.js",
|
|
||||||
publicPath: "/",
|
|
||||||
hashFunction: "xxhash64",
|
hashFunction: "xxhash64",
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
|
@ -73,7 +70,9 @@ module.exports = (env, argv) => {
|
||||||
...base,
|
...base,
|
||||||
entry: "./src/server/index.tsx",
|
entry: "./src/server/index.tsx",
|
||||||
output: {
|
output: {
|
||||||
|
...base.output,
|
||||||
filename: "js/server.js",
|
filename: "js/server.js",
|
||||||
|
publicPath: "/",
|
||||||
},
|
},
|
||||||
target: "node",
|
target: "node",
|
||||||
externals: [nodeExternals(), "inferno-helmet"],
|
externals: [nodeExternals(), "inferno-helmet"],
|
||||||
|
@ -83,6 +82,7 @@ module.exports = (env, argv) => {
|
||||||
...base,
|
...base,
|
||||||
entry: "./src/client/index.tsx",
|
entry: "./src/client/index.tsx",
|
||||||
output: {
|
output: {
|
||||||
|
...base.output,
|
||||||
filename: "js/client.js",
|
filename: "js/client.js",
|
||||||
publicPath: `/static/${env.COMMIT_HASH}/`,
|
publicPath: `/static/${env.COMMIT_HASH}/`,
|
||||||
},
|
},
|
||||||
|
@ -146,6 +146,7 @@ module.exports = (env, argv) => {
|
||||||
// name: "server",
|
// name: "server",
|
||||||
// };
|
// };
|
||||||
|
|
||||||
|
const RunNodeWebpackPlugin = require("run-node-webpack-plugin");
|
||||||
serverConfig.plugins.push(
|
serverConfig.plugins.push(
|
||||||
new RunNodeWebpackPlugin({ runOnlyInWatchMode: true })
|
new RunNodeWebpackPlugin({ runOnlyInWatchMode: true })
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue