webpack cache option not working in esm module

Viewed 217

I have my package.json set as type="module". I am trying to use filesystem cache provided in webpack 5 like

cache: {
        type: 'filesystem' //  Use file caching
    },

but keep getting warning as

<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve 'url' in 'C:\vbrick\rev-avenger-old'
<w> while resolving 'url' in C:\vbrick\rev-avenger-old as file
<w>  at resolve esm file url

I tried to use chaceLocation and cacheDirectory but still having same issue.

Any help highly appreciated!!!

0 Answers
Related