Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document webpack change: Create Cache facade to make it easier to use #3843

Open
webpack-bot opened this issue Jul 15, 2020 · 7 comments
Open

Comments

@webpack-bot
Copy link

A pull request by @sokra was merged and maintainers requested a documentation change.

See pull request: webpack/webpack#11176


add missing serializers for classes used in test suite

cc @evilebottnawi for terser-webpack-plugin

What kind of change does this PR introduce?
feature

Did you add tests for your changes?
internal plugins now use the new API

Does this PR introduce a breaking change?
yes, compilation.cache is deprecated now

What needs to be documented once your changes are merged?

  • The API for access to cache has changed. It's now very similar to the API to get Loggers.

compilation.getCache("MyPlugin") resp. compiler.getCache("MyPlugin") can be used to get a CacheFacade, which is a way to access the cache. compilation.getCache should be preferred of compiler.getCache.

Interface of CacheFacade see here: https://github.com/webpack/webpack/pull/11176/files#diff-d96ec7ae5bb4a0907779f25ed03acb33

There are methods for get and store and promise variants.
There is also a getChildCache(name) method to get a child cache,
and there is a getItemCache(identifier, etag) to get an ItemCacheFacade which allows to access a single item.

The CacheFacade also exposes getLazyHashedEtag to get etags for hashable objects like Sources.

@jeffin143
Copy link
Contributor

Wip

@mitchell-frost
Copy link
Contributor

I would like to work on this issue.

@jeffin143
Copy link
Contributor

I am currently working, if I am not able to you can take it

@mitchell-frost
Copy link
Contributor

I am currently working, if I am not able to you can take it

Okay :)

@Yee1014
Copy link

Yee1014 commented Mar 26, 2021

Plz update documentation
It's so baffled ~

@howdyAnkit
Copy link

Can anyone tell me how to fix this Deprecation Warning?
@Yee1014 @mitchell-frost @jeffin143
Thanks in Advance.

@howdyAnkit
Copy link

howdyAnkit commented Apr 12, 2021

people getting those Error it's produced due to the 3rd party plugins are not being supported/might be deprecated if someone's struggling with offline-plugin might need to take a Look into the link below there are few alternatives if you'd like to consider.

NekR/offline-plugin#491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants