Describe the feature
Some plugins cannot work with Webpack 5's persistent cache and require it to be disabled. What are the potential solutions to this issue?
can we just do this in tramsform(same to load):
export default async function transform(this: LoaderContext<{ unpluginName: string }>, source: string, map: any) {
const callback = this.async()
+ // add this line to disable cache in specific situations
+ this.cacheable(false)
let unpluginName: string
...
or just passing some options to the loader like this:
// transform hook
if (plugin.transform) {
const useLoader: RuleSetUseItem[] = [{
loader: `${TRANSFORM_LOADER}?unpluginName=${encodeURIComponent(plugin.name)}&cache[type]=memory`,
}]
Additional information
Describe the feature
Some plugins cannot work with Webpack 5's persistent cache and require it to be disabled. What are the potential solutions to this issue?
can we just do this in
tramsform(same toload):export default async function transform(this: LoaderContext<{ unpluginName: string }>, source: string, map: any) { const callback = this.async() + // add this line to disable cache in specific situations + this.cacheable(false) let unpluginName: string ...or just passing some options to the loader like this:
Additional information