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

search results link to right place and docs for build Deps #3436

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"directory-tree": "2.2.0",
"directory-tree-webpack-plugin": "0.3",
"duplexer": "^0.1.1",
"eslint": "4.19.1",
Copy link
Member

Choose a reason for hiding this comment

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

You've removed eslint and that's what leading to the CI failure.

"eslint-loader": "^2.0.0",
"eslint-plugin-markdown": "1.0.0-rc.0",
"file-loader": "^1.1.11",
Expand All @@ -105,7 +104,7 @@
"http-server": "^0.10.0",
"husky": "^1.0.0-rc.8",
"hyperlink": "^4.4.0",
"lint-staged": "^8.1.0",
"lint-staged": "^10.0.0-beta.14",
"loader-utils": "^1.1.0",
"lodash": "^4.17.4",
"markdown-loader": "^4.0.0",
Expand Down
8 changes: 8 additions & 0 deletions src/components/Link/Link.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import React from 'react';
import { Link } from 'react-router-dom';

function offsetAnchor() {
if(location.hash.length !== 0) {
window.scrollTo(window.scrollX, window.scrollY - 100);
}
}
window.addEventListener('hashchange', offsetAnchor);
window.setTimeout(offsetAnchor, 1);

export default ({
to = '',
url,
Expand Down
29 changes: 29 additions & 0 deletions src/content/configuration/other-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ contributors:
- EugeneHlushko
- skovy
- rishabh3112
- niravasher
related:
- title: Using Records
url: https://survivejs.com/webpack/optimizing/separating-manifest/#using-records
Expand Down Expand Up @@ -125,6 +126,34 @@ module.exports = {

W> The final location of the cache is a combination of `cache.cacheDirectory` + `cache.name`.

### `cache.buildDependencies`

`object`

`cache.buildDependencies` is an object of arrays of additional code dependencies of the build. webpack will use a hash of each of these items and all dependencies to invalidate the filesystem cache.

Defaults to `webpack/lib` to get all dependencies of webpack.

T> It's recommended to set `cache.buildDependencies.config: [__filename]` in your webpack configuration to get the latest configuration and all dependencies.

```javascript
module.exports = {
cache: {
buildDependencies: {
// This makes all dependencies of this file - build dependencies
config: [__filename]
// By default webpack and loaders are build dependencies
}
}
};
```

### `cache.managedPaths`

`[path] = ['./node_modules']`

`cache.managedPaths` is an array of package-manager only managed paths. webpack will avoid hashing and timestamping them, assume the version is unique and will use it as a snapshot (for both memory and filesystem cache).

### `cache.hashAlgorithm`

`string`
Expand Down