11/** @typedef {import("@rspack/core").Compiler } Compiler */
2+ /** @typedef {import("@rspack/core").Compilation } Compilation */
23/** @typedef {import("@rspack/core").Stats } Stats */
34/** @typedef {import("@rspack/core").MultiStats } MultiStats */
4- /** @typedef {import("@rspack/core").Asset } Asset */
55/** @typedef {import("../index.js").DevServerOption } DevServerOption */
66/** @typedef {import("../index.js").IncomingMessage } IncomingMessage */
77/** @typedef {import("../index.js").OutputFileSystem } OutputFileSystem */
1111 * @template {IncomingMessage} Request
1212 * @template {ServerResponse} Response
1313 * @param {import("../index.js").FilledContext<Request, Response> } context context
14- * @returns {{ outputPath: string, outputFileSystem: OutputFileSystem, publicPath: string, assetsInfo: Map<string, Asset["info"]> | undefined }[] } paths
14+ * @returns {{ compilation: Compilation, outputPath: string, outputFileSystem: OutputFileSystem, publicPath: string }[] } paths
1515 */
1616function getPaths ( context ) {
1717 const { stats, options } = context ;
@@ -22,7 +22,7 @@ function getPaths(context) {
2222 ( stats ) . stats
2323 ? /** @type {MultiStats } */ ( stats ) . stats
2424 : [ /** @type {Stats } */ ( stats ) ] ;
25- /** @type {{ outputPath: string, outputFileSystem: OutputFileSystem, publicPath: string, assetsInfo: Map<string, Asset["info"]> | undefined }[] } */
25+ /** @type {{ compilation: Compilation, outputPath: string, outputFileSystem: OutputFileSystem, publicPath: string }[] } */
2626 const publicPaths = [ ] ;
2727
2828 for ( const { compilation } of childStats ) {
@@ -44,19 +44,16 @@ function getPaths(context) {
4444 /** @type {any } */ ( compilation . outputOptions . publicPath ) ,
4545 )
4646 : "" ;
47- const assetsInfo = new Map (
48- compilation . getAssets ( ) . map ( ( asset ) => [ asset . name , asset . info ] ) ,
49- ) ;
5047 const { outputFileSystem } =
5148 /** @type {Compiler & { outputFileSystem: OutputFileSystem } } */ (
5249 compilation . compiler
5350 ) ;
5451
5552 publicPaths . push ( {
53+ compilation,
5654 outputPath,
5755 outputFileSystem,
5856 publicPath,
59- assetsInfo,
6057 } ) ;
6158 }
6259
0 commit comments