1+ /* eslint-disable import/no-extraneous-dependencies */
12import path from 'path' ;
2- import { Configuration } from '@rspack/cli' ;
3+ import type { Configuration } from '@rspack/cli' ;
34import * as rspack from '@rspack/core' ;
45import type { SwcLoaderOptions } from '@rspack/core' ;
56import { WebpackSweetEntry } from '@sect/webpack-sweet-entry' ;
@@ -11,6 +12,7 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
1112import notifier from 'node-notifier' ;
1213import StyleLintPlugin from 'stylelint-webpack-plugin' ;
1314// import SVGSpritemapPlugin from 'svg-spritemap-webpack-plugin';
15+ import type { WebpackError } from 'webpack/types' ;
1416import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer' ;
1517import RemoveEmptyScriptsPlugin from 'webpack-remove-empty-scripts' ;
1618
@@ -112,7 +114,7 @@ const getJSPlugins = () => {
112114
113115 plugins . push (
114116 new NotifierPlugin ( {
115- onErrors : ( severity : string , errors : any [ ] ) => {
117+ onErrors : ( severity : string , errors : WebpackError [ ] ) => {
116118 if ( severity !== 'error' ) return ;
117119 const error = errors [ 0 ] ;
118120 notifier . notify ( {
@@ -149,7 +151,7 @@ const getCSSPlugins = () => {
149151
150152 plugins . push (
151153 new NotifierPlugin ( {
152- onErrors : ( severity : string , errors : any [ ] ) => {
154+ onErrors : ( severity : string , errors : WebpackError [ ] ) => {
153155 if ( severity !== 'error' ) return ;
154156 const error = errors [ 0 ] ;
155157 notifier . notify ( {
0 commit comments