chore: making some more progress with webpack 5

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2021-06-07 13:35:13 +02:00
parent c4ef9181a4
commit 8dfcf8cb55
3 changed files with 200 additions and 201 deletions
+1 -1
View File
@@ -110,7 +110,7 @@
"url-loader": "^4.1.0",
"util": "^0.12.3",
"webpack": "^5.0.0",
"webpack-dev-server": "^3.11.2",
"webpack-dev-server": "4.0.0-beta.3",
"webpack-node-externals": "^3.0.0",
"yaml": "^1.10.0",
"yaml-jest": "^1.0.5",
+11 -6
View File
@@ -44,22 +44,27 @@ export async function serveBundle(options: ServeOptions) {
const server = new WebpackDevServer(compiler, {
hot: !process.env.CI,
contentBase: paths.targetPublic,
contentBasePublicPath: config.output?.publicPath as string,
publicPath: config.output?.publicPath as string,
devMiddleware: {
// contentBase: paths.targetPublic,
publicPath: config.output?.publicPath as string,
},
static: {
publicPath: config.output?.publicPath as string,
directory: paths.targetPublic,
},
historyApiFallback: {
// Paths with dots should still use the history fallback.
// See https://github.com/facebookincubator/create-react-app/issues/387.
disableDotRule: true,
},
clientLogLevel: 'warning',
stats: 'errors-warnings',
// clientLogLevel: 'warning',
// stats: 'errors-warnings',
https: url.protocol === 'https:',
host,
port,
proxy: pkg.proxy,
// When the dev server is behind a proxy, the host and public hostname differ
allowedHosts: [url.hostname],
// allowedHosts: [url.hostname],
});
await new Promise<void>((resolve, reject) => {