chore: update webpack dependencies
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import MiniCSSExtractPlugin from 'mini-css-extract-plugin';
|
||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
import path from 'path';
|
||||
import { Configuration } from 'webpack';
|
||||
import { Configuration, WebpackPluginInstance } from 'webpack';
|
||||
import { SanitizedConfig } from '../config/types';
|
||||
import getBaseConfig from './getBaseConfig';
|
||||
|
||||
@@ -67,7 +67,7 @@ export default (payloadConfig: SanitizedConfig): Configuration => {
|
||||
});
|
||||
|
||||
if (process.env.PAYLOAD_ANALYZE_BUNDLE) {
|
||||
config.plugins.push(new BundleAnalyzerPlugin());
|
||||
config.plugins.push(new BundleAnalyzerPlugin() as unknown as WebpackPluginInstance);
|
||||
}
|
||||
|
||||
if (payloadConfig.admin.webpack && typeof payloadConfig.admin.webpack === 'function') {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import webpack from 'webpack';
|
||||
import webpack, { Compiler } from 'webpack';
|
||||
import express, { Router } from 'express';
|
||||
import webpackDevMiddleware from 'webpack-dev-middleware';
|
||||
import webpackHotMiddleware from 'webpack-hot-middleware';
|
||||
@@ -15,7 +15,7 @@ function initWebpack(config: SanitizedConfig): Router {
|
||||
publicPath: webpackDevConfig.output.publicPath as string,
|
||||
}));
|
||||
|
||||
router.use(webpackHotMiddleware(compiler));
|
||||
router.use(webpackHotMiddleware(compiler as any));
|
||||
|
||||
return router;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user