memory-fs icon indicating copy to clipboard operation
memory-fs copied to clipboard

output fileName query

Open PengBoUESTC opened this issue 4 years ago • 0 comments

if we config webpack like this config.output.filename(js/[name].js?${VERSION.commit}).end();,

webpack will cut off the query of the fileName, when write into the MemoryFileSystem instance.

const queryStringIdx = targetFile.indexOf("?"); if (queryStringIdx >= 0) { targetFile = targetFile.substr(0, queryStringIdx); }

but we will read the cache content with a query name, so that we can't read the correct file.

maybe we can cut off the query when read the fileContent from MemoryFileSystem instance

PengBoUESTC avatar Jan 13 '22 11:01 PengBoUESTC