Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix base.output (see #1911) #1943

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix base.output (see #1911)
  • Loading branch information
tiziodcaio committed Jul 14, 2023
commit 17cf9de57fbb69c9eb845d6f8a7c5f830de791c2
7 changes: 4 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
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