Skip to content

Commit aa44afb

Browse files
kevinmarreckeisuke.inbe
andcommitted
fix(types): fix webpack-hot-middleware types
Fixes nuxt#334 Closes nuxt#333 Co-authored-by: keisuke.inbe <[email protected]>
1 parent ef4fc39 commit aa44afb

File tree

4 files changed

+810
-736
lines changed

4 files changed

+810
-736
lines changed

packages/types/config/build.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
} from 'webpack'
2424
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
2525
import { Options as WebpackDevMiddlewareOptions } from 'webpack-dev-middleware'
26-
import { Options as WebpackHotMiddlewareOptions } from 'webpack-hot-middleware'
26+
import { MiddlewareOptions as WebpackHotMiddlewareOptions, ClientOptions as WebpackHotMiddlewareClientOptions } from 'webpack-hot-middleware'
2727

2828
type CssLoaderUrlFunction = (url: string, resourcePath: string) => boolean
2929
type CssLoaderImportFunction = (parsedImport: string, resourcePath: string) => boolean
@@ -150,7 +150,7 @@ export interface NuxtConfigurationBuild {
150150
filenames?: { [key in 'app' | 'chunk' | 'css' | 'img' | 'font' | 'video']?: (ctx: NuxtWebpackEnv) => string }
151151
friendlyErrors?: boolean
152152
hardSource?: boolean
153-
hotMiddleware?: WebpackHotMiddlewareOptions & { client: any /* TBD */ }
153+
hotMiddleware?: WebpackHotMiddlewareOptions & { client?: WebpackHotMiddlewareClientOptions }
154154
html?: { minify: HtmlMinifierOptions }
155155
indicator?: boolean
156156
loaders?: NuxtConfigurationLoaders

packages/types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@types/webpack": "^4.41.10",
2727
"@types/webpack-bundle-analyzer": "^2.13.3",
2828
"@types/webpack-dev-middleware": "^3.7.0",
29-
"@types/webpack-hot-middleware": "^2.25.0"
29+
"@types/webpack-hot-middleware": "^2.25.1"
3030
},
3131
"publishConfig": {
3232
"access": "public"

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"lib": ["dom", "esnext"],
55
"module": "esnext",
66
"moduleResolution": "node",
7-
"skipLibCheck": true,
87
"esModuleInterop": true,
98
"strict": true,
109
"noFallthroughCasesInSwitch": true,

0 commit comments

Comments
 (0)