Download wp-calypso/build-tools/webpack/readonly-cache-plugin.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 478 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/build-tools/webpack/readonly-cache-plugin.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/build-tools/webpack/readonly-cache-plugin.js
-
curl -L -o readonly-cache-plugin.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/build-tools/webpack/readonly-cache-plugin.js
478 Bytes
| module.exports = class ReadonlyCachePlugin { | |
| apply( compiler ) { | |
| compiler.cache.hooks.store.intercept( { | |
| register: ( tapInfo ) => { | |
| compiler | |
| .getInfrastructureLogger( 'webpack.cache.ReadonlyCachePlugin' ) | |
| .info( `Cache is in read only mode. ${ tapInfo.name } won't be executed` ); | |
| return { | |
| ...tapInfo, | |
| fn: function () { | |
| //A no-op function prevent any hook to `compiler.cache.hooks.store` to do anything. | |
| }, | |
| }; | |
| }, | |
| } ); | |
| } | |
| }; | |