chore: making some more progress with webpack 5
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user