Skip to content

Docs(config) : add module.unsafeCache - #3714

Merged
EugeneHlushko merged 10 commits into
webpack:masterfrom
jeffin143:unsafecache
May 18, 2020
Merged

EugeneHlushko merged 10 commits into
webpack:masterfrom
jeffin143:unsafecache

Conversation

@jeffin143

@jeffin143 jeffin143 commented Apr 24, 2020 •

Copy link
Copy Markdown
Contributor

add module.unsafeCache

#2539
webpack/webpack#10771

  • Read and sign the [CLA][1]. PRs that haven't signed it won't be accepted.
  • Make sure your PR complies with the [writer's guide][2].
  • Review the diff carefully as sometimes this can reveal issues.
  • Do not abandon your Pull Request: [Stale Pull Requests][3].

cc @salemhilal

@vercel
vercel Bot temporarily deployed to Preview April 24, 2020 15:42 Inactive
@vercel

vercel Bot commented Apr 24, 2020 •

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/webpack-docs/webpack-js-org/fbfns3mdy
✅ Preview: https://webpack-js-org-git-fork-jeffin143-unsafecache.webpack-docs.now.sh

@salemhilal

Copy link
Copy Markdown

That was fast! Thank you. I'm a little unclear about how docs for v4 and v5 are updated separately, but can you mention that:

  1. v4's default is true, and
  2. v5's default is false unless the module appears to come from node_modules (and is disabled if cache is disabled)?

@jeffin143

jeffin143 commented Apr 24, 2020 •

Copy link
Copy Markdown
Contributor Author

That was fast! Thank you. I'm a little unclear about how docs for v4 and v5 are updated separately, but can you mention that:

  1. v4's default is true, and
  2. v5's default is false unless the module appears to come from node_modules (and is disabled if cache is disabled)?

Just had a glance at the source code for deafult option and you are right it is false only if cache is disabled I will updated that

Also we need to raise a pr against v4 branch for the docs update for v4 , if you are ok with me raising the same , I can do it, also if you want to handle it , no issues with it :)

Thanks for digging and coming up with the issue

@salemhilal

Copy link
Copy Markdown

It's up to you! I'd be happy to update the v4 docs if you're not eager about opening another PR, but otherwise you're welcome to it.

@jeffin143

Copy link
Copy Markdown
Contributor Author

It's up to you! I'd be happy to update the v4 docs if you're not eager about opening another PR, but otherwise you're welcome to it.

Please feel free to open one :)

Comment thread src/content/configuration/module.mdx Resolved

@EugeneHlushko EugeneHlushko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but with the new commits i see issues, can you please have a look? Anyone else want to comment on the resolution of vs the resolving of

Comment thread src/content/configuration/module.mdx Resolved
Comment thread src/content/configuration/module.mdx Resolved
Comment thread src/content/configuration/module.mdx Resolved
Comment thread src/content/configuration/module.mdx Resolved
@vercel
vercel Bot temporarily deployed to Preview May 2, 2020 19:01 Inactive
@salemhilal

Copy link
Copy Markdown

@EugeneHlushko two thoughts:

  1. I'm ok with "the resolution of" personally.
  2. Are other things besides the resolution cached, like dependencies?
  3. Is it worth mentioning why it's unsafe in the first place?

Perhaps something like this might be a good idea:

Cache the resolution of module requests, as well as the module's list of dependencies. Note that this feature can cause problems if the module is moved and should resolve to a different location.

@salemhilal

Copy link
Copy Markdown

One more nit: should this section go below noParse to maintain alphabetical order?

Comment thread src/content/configuration/module.mdx Resolved
Comment thread src/content/configuration/module.mdx Resolved
salemhilal added a commit to salemhilal/webpack.js.org that referenced this pull request May 3, 2020
This PR mirrors webpack#3714 for the v4 documentation.
It addresses the following issues:
- webpack#2539
- webpack/webpack#10771
salemhilal added a commit to salemhilal/webpack.js.org that referenced this pull request May 3, 2020
@jeffin143 made the initial pass on this documentation in the v5 docs (see webpack#3714)
@salemhilal

Copy link
Copy Markdown

@jeffcooper86 I left a bunch of comments and opened #3728 to mirror these changes to the v4 docs.

@EugeneHlushko EugeneHlushko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two bits already mentioned above and its good to go.

@salemhilal
You don't need to do alphabetical ordering of the options, they are usually grouped by the context

Comment thread src/content/configuration/module.mdx Resolved
@vercel
vercel Bot temporarily deployed to Preview May 18, 2020 18:57 Inactive
@EugeneHlushko
EugeneHlushko merged commit 46b19f1 into webpack:master May 18, 2020
@EugeneHlushko

Copy link
Copy Markdown
Contributor

Thanks!

This branch was successfully deployed

1 active deployment
Preview — 20797309 Deployed May 18, 2020 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants