From f011df6ea0a6e2c86dbb58a5abbb143887d17357 Mon Sep 17 00:00:00 2001 From: wesleybl Date: Tue, 4 Jul 2023 16:18:54 -0300 Subject: [PATCH] Put prefixPath in config.devServer.devMiddleware.publicPath After updating from webpack-dev-server v3. -> v.4 the configuration config.devServer.publicPath is now: config.devServer.devMiddleware.publicPath See: https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md#-breaking-changes Avoid error: ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. --- razzle.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/razzle.config.js b/razzle.config.js index 7ad34b84e50..ca1ea8d2c56 100644 --- a/razzle.config.js +++ b/razzle.config.js @@ -343,7 +343,7 @@ const defaultModify = ({ if (prefixPath) { if (target === 'web' && dev) { - config.devServer.publicPath = prefixPath; + config.devServer.devMiddleware.publicPath = prefixPath; } const pp = config.output.publicPath; config.output.publicPath = `${pp}${prefixPath.slice(1)}/`;