Skip to content

Commit

Permalink
Fix base.output (see #1911) (#1943)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiziodcaio committed Jul 14, 2023
1 parent b7ec7ae commit 9c48968
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions webpack.config.js
Expand Up @@ -3,7 +3,6 @@ const { resolve } = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const nodeExternals = require("webpack-node-externals");
const CopyPlugin = require("copy-webpack-plugin");
const RunNodeWebpackPlugin = require("run-node-webpack-plugin");
const { ServiceWorkerPlugin } = require("service-worker-webpack");

const banner = `
Expand All @@ -18,8 +17,6 @@ module.exports = (env, argv) => {

const base = {
output: {
filename: "js/server.js",
publicPath: "/",
hashFunction: "xxhash64",
},
resolve: {
Expand Down Expand Up @@ -73,7 +70,9 @@ module.exports = (env, argv) => {
...base,
entry: "./src/server/index.tsx",
output: {
...base.output,
filename: "js/server.js",
publicPath: "/",
},
target: "node",
externals: [nodeExternals(), "inferno-helmet"],
Expand All @@ -83,6 +82,7 @@ module.exports = (env, argv) => {
...base,
entry: "./src/client/index.tsx",
output: {
...base.output,
filename: "js/client.js",
publicPath: `/static/${env.COMMIT_HASH}/`,
},
Expand Down Expand Up @@ -146,6 +146,7 @@ module.exports = (env, argv) => {
// name: "server",
// };

const RunNodeWebpackPlugin = require("run-node-webpack-plugin");
serverConfig.plugins.push(
new RunNodeWebpackPlugin({ runOnlyInWatchMode: true })
);
Expand Down

0 comments on commit 9c48968

Please sign in to comment.