Skip to content

Evaluate all http redirects of outgoing links #1978

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

Merged
merged 2 commits into from
Apr 5, 2018
Merged
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
2 changes: 1 addition & 1 deletion src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Footer = () => (
<section className="footer__right">
<Link className="footer__link" to="/glossary/">Glossary</Link>
<Link className="footer__link" to="/branding/">Branding</Link>
<Link className="footer__link" to="//gitter.im/webpack/webpack">Gitter</Link>
<Link className="footer__link" to="https://gitter.im/webpack/webpack">Gitter</Link>
Copy link
Member

Choose a reason for hiding this comment

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

I was going to commend about this https://www.paulirish.com/2010/the-protocol-relative-url/, but then realize is from 8 years ago and see that is now considered an antipattern, also realize how old I am 📟

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I very much know that feeling :D

<Link className="footer__link" to="https://github.com/webpack/webpack/releases">Changelog</Link>
<Link className="footer__link footer__license" to="/license">
<img
Expand Down
2 changes: 1 addition & 1 deletion src/components/StarterKits/StarterKits.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const StarterKits = props => (
The following table contains a curated list of starter kits that can
be used as a jumping off point for webpack-based projects. To add a new
kit to the list please visit{' '}
<Link to="https://github.com/ahfarmer/tool-list">this repository</Link>{' '}
<Link to="https://github.com/ahfarmer/javascriptstuff-db">this repository</Link>{' '}
and submit a PR against this file:
<code>generator/starterProjectUrls.js</code>.
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/content/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ webpack --json
webpack --json > stats.json
```

In every other case, webpack prints out a set of stats showing bundle, chunk and timing details. Using this option the output can be a JSON object. This response is accepted by webpack's [analyse tool](https://webpack.github.com/analyse), or chrisbateman's [webpack-visualizer](https://chrisbateman.github.io/webpack-visualizer/), or th0r's [webpack-bundle-analyzer](https://github.com/th0r/webpack-bundle-analyzer). The analyse tool will take in the JSON and provide all the details of the build in graphical form.
In every other case, webpack prints out a set of stats showing bundle, chunk and timing details. Using this option the output can be a JSON object. This response is accepted by webpack's [analyse tool](https://webpack.github.io/analyse/), or chrisbateman's [webpack-visualizer](https://chrisbateman.github.io/webpack-visualizer/), or th0r's [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer). The analyse tool will take in the JSON and provide all the details of the build in graphical form.

### Environment Options

Expand Down
2 changes: 1 addition & 1 deletion src/content/api/loaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ addDependency(file: string)
dependency(file: string) // shortcut
```

Adds a file as dependency of the loader result in order to make them watchable. For example, [`html-loader`](https://github.com/webpack/html-loader) uses this technique as it finds `src` and `src-set` attributes. Then, it sets the url's for those attributes as dependencies of the html file that is parsed.
Adds a file as dependency of the loader result in order to make them watchable. For example, [`html-loader`](https://github.com/webpack-contrib/html-loader) uses this technique as it finds `src` and `src-set` attributes. Then, it sets the url's for those attributes as dependencies of the html file that is parsed.


### `this.addContextDependency`
Expand Down
8 changes: 4 additions & 4 deletions src/content/api/module-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ exports.aFunction = function doSomething() {

### `global` (NodeJS)

See [node.js global](http://nodejs.org/api/globals.html#globals_global).
See [node.js global](https://nodejs.org/api/globals.html#globals_global).


### `process` (NodeJS)

See [node.js process](http://nodejs.org/api/process.html).
See [node.js process](https://nodejs.org/api/process.html).


### `__dirname` (NodeJS)
Expand All @@ -80,7 +80,7 @@ Depending on the config option `node.__dirname`:

* `false`: Not defined
* `mock`: equal "/"
* `true`: [node.js __dirname](http://nodejs.org/api/globals.html#globals_dirname)
* `true`: [node.js __dirname](https://nodejs.org/api/globals.html#globals_dirname)

If used inside a expression that is parsed by the Parser, the config option is treated as `true`.

Expand All @@ -91,7 +91,7 @@ Depending on the config option `node.__filename`:

* `false`: Not defined
* `mock`: equal "/index.js"
* `true`: [node.js __filename](http://nodejs.org/api/globals.html#globals_filename)
* `true`: [node.js __filename](https://nodejs.org/api/globals.html#globals_filename)

If used inside a expression that is parsed by the Parser, the config option is treated as `true`.

Expand Down
4 changes: 2 additions & 2 deletions src/content/branding.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ T> For those of you following our guidelines and have gotten this far, we've mad

## Font

We use the beautiful [Geomanist Medium](http://geomanist.com/) font from the extremely talented folks at the [Atipo Foundry](http://atipofoundry.com/) who provide the entire font family at a 'pay what you want' model.
We use the beautiful [Geomanist Medium](http://atipofoundry.com/fonts/geomanist) font from the extremely talented folks at the [Atipo Foundry](http://atipofoundry.com/) who provide the entire font family at a 'pay what you want' model.


## Color Palette

The following colors are used throughout the site in various combinations and on our fancy clothing line launched with the help of [Open Collective](http://opencollective.com) and [Threadless](https://medium.com/u/840563ee2a56) over at the [official webpack store](https://webpack.threadless.com/collections/the-final-release-collection/)!
The following colors are used throughout the site in various combinations and on our fancy clothing line launched with the help of [Open Collective](https://opencollective.com/) and [Threadless](https://medium.com/u/840563ee2a56) over at the [official webpack store](https://webpack.threadless.com/collections/the-final-release-collection/)!

| Color Name | HEX Code | RGB Code | Sample
|---------------|---------------|-----------------------|-------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/content/comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ webpack is not the only module bundler out there. If you are choosing between us
| Node.js built-in libs `require("path")` | **yes** | no | **yes** | **yes** | [node-resolve-plugin](https://github.com/rollup/rollup-plugin-node-resolve) | |
| Other Node.js stuff | process, __dir/filename, global | - | process, __dir/filename, global | process, __dir/filename, global for cjs | global ([commonjs-plugin](https://github.com/rollup/rollup-plugin-commonjs)) | |
| Plugins | **yes** | yes | **yes** | yes | yes | yes |
| Preprocessing | **loaders, [transforms](https://github.com/webpack/transform-loader)** | loaders | transforms | plugin translate | plugin transforms | compilers, optimizers |
| Preprocessing | **loaders, [transforms](https://github.com/webpack-contrib/transform-loader)** | loaders | transforms | plugin translate | plugin transforms | compilers, optimizers |
| Replacement for browser | `web_modules`, `.web.js`, package.json field, alias config option | alias option | package.json field, alias option | package.json, alias option | no | |
| Requirable files | file system | **web** | file system | through plugins | file system or through plugins | file system |
| Runtime overhead | **243B + 20B per module + 4B per dependency** | 14.7kB + 0B per module + (3B + X) per dependency | 415B + 25B per module + (6B + 2X) per dependency | 5.5kB for self-executing bundles, 38kB for full loader and polyfill, 0 plain modules, 293B CJS, 139B ES2015 System.register before gzip | **none for ES2015 modules** (other formats may have) | |
| Watch mode | yes | not required | [watchify](https://github.com/substack/watchify) | not needed in dev | [rollup-watch](https://github.com/rollup/rollup-watch) | yes |
| Watch mode | yes | not required | [watchify](https://github.com/browserify/watchify) | not needed in dev | [rollup-watch](https://github.com/rollup/rollup-watch) | yes |


♦ in production mode (opposite in development mode)
Expand Down
2 changes: 1 addition & 1 deletion src/content/concepts/hot-module-replacement.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The compiler ensures that module IDs and chunk IDs are consistent between these

### In a Module

HMR is an opt-in feature that only affects modules containing HMR code. One example would be patching styling through the [`style-loader`](https://github.com/webpack/style-loader). In order for patching to work, the `style-loader` implements the HMR interface; when it receives an update through HMR, it replaces the old styles with the new ones.
HMR is an opt-in feature that only affects modules containing HMR code. One example would be patching styling through the [`style-loader`](https://github.com/webpack-contrib/style-loader). In order for patching to work, the `style-loader` implements the HMR interface; when it receives an update through HMR, it replaces the old styles with the new ones.

Similarly, when implementing the HMR interface in a module, you can describe what should happen when the module is updated. However, in most cases, it's not mandatory to write HMR code in every module. If a module has no HMR handlers, the update bubbles up. This means that a single handler can update a complete module tree. If a single module from the tree is updated, the entire set of dependencies is reloaded.

Expand Down
2 changes: 1 addition & 1 deletion src/content/configuration/devtool.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ contributors:
- lricoy
related:
- title: Enabling Sourcemaps
url: http://survivejs.com/webpack/developing-with-webpack/enabling-sourcemaps/
url: https://survivejs.com/webpack/developing-with-webpack/enabling-sourcemaps/
- title: Webpack's Devtool Source Map
url: http://cheng.logdown.com/posts/2016/03/25/679045
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/configuration/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ publicPath: "../assets/", // relative to HTML page
publicPath: "", // relative to HTML page (same directory)
```

In cases where the `publicPath` of output files can't be known at compile time, it can be left blank and set dynamically at runtime in the entry file using the [free variable](http://stackoverflow.com/questions/12934929/what-are-free-variables) `__webpack_public_path__`.
In cases where the `publicPath` of output files can't be known at compile time, it can be left blank and set dynamically at runtime in the entry file using the [free variable](https://stackoverflow.com/questions/12934929/what-are-free-variables) `__webpack_public_path__`.

``` js
__webpack_public_path__ = myRuntimePublicPath
Expand Down
4 changes: 2 additions & 2 deletions src/content/configuration/target.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Option | Description
`async-node` | Compile for usage in a Node.js-like environment (uses `fs` and `vm` to load chunks asynchronously)
~~`atom`~~ | Alias for `electron-main`
~~`electron`~~ | Alias for `electron-main`
`electron-main` | Compile for [Electron](http://electron.atom.io/) for main process.
`electron-renderer` | Compile for [Electron](http://electron.atom.io/) for renderer process, providing a target using `JsonpTemplatePlugin`, `FunctionModulePlugin` for browser environments and `NodeTargetPlugin` and `ExternalsPlugin` for CommonJS and Electron built-in modules.
`electron-main` | Compile for [Electron](https://electronjs.org/) for main process.
`electron-renderer` | Compile for [Electron](https://electronjs.org/) for renderer process, providing a target using `JsonpTemplatePlugin`, `FunctionModulePlugin` for browser environments and `NodeTargetPlugin` and `ExternalsPlugin` for CommonJS and Electron built-in modules.
`node` | Compile for usage in a Node.js-like environment (uses Node.js `require` to load chunks)
`node-webkit` | Compile for usage in WebKit and uses JSONP for chunk loading. Allows importing of built-in Node.js modules and [`nw.gui`](http://docs.nwjs.io/en/latest/) (experimental)
`web` | Compile for usage in a browser-like environment **(default)**
Expand Down
4 changes: 2 additions & 2 deletions src/content/configuration/watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ For some systems, watching many file systems can result in a lot of CPU or memor
ignored: /node_modules/
```

It is also possible to use [anymatch](https://github.com/es128/anymatch) patterns:
It is also possible to use [anymatch](https://github.com/micromatch/anymatch) patterns:

```js
ignored: "files/**/*.js"
Expand All @@ -68,7 +68,7 @@ ignored: "files/**/*.js"

`boolean` `number`

Turn on [polling](http://whatis.techtarget.com/definition/polling) by passing `true`, or specifying a poll interval in milliseconds:
Turn on [polling](https://whatis.techtarget.com/definition/polling) by passing `true`, or specifying a poll interval in milliseconds:

```js
poll: 1000 // Check for changes every second
Expand Down
2 changes: 1 addition & 1 deletion src/content/contribute/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contributors:
- tbroadley
---

The people who contribute to webpack do so for the love of open source, our users and ecosystem, and most importantly, pushing the web forward together. Because of our [Open Collective](http://opencollective.com/webpack) model for funding and transparency, we are able to funnel support and funds through contributors, dependent projects, and the contributor and core teams. To make a donation, simply click the button below...
The people who contribute to webpack do so for the love of open source, our users and ecosystem, and most importantly, pushing the web forward together. Because of our [Open Collective](https://opencollective.com//webpack) model for funding and transparency, we are able to funnel support and funds through contributors, dependent projects, and the contributor and core teams. To make a donation, simply click the button below...

<div align="center">
<a href="https://opencollective.com/webpack/donate" target="_blank">
Expand Down
4 changes: 2 additions & 2 deletions src/content/guides/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ related:
- title: Predictable Long Term Caching
url: https://medium.com/webpack/predictable-long-term-caching-with-webpack-d3eee1d3fa31
- title: Long Term Caching of Static Assets
url: https://medium.com/@okonetchnikov/long-term-caching-of-static-assets-with-webpack-1ecb139adb95#.vtwnssps4
url: https://codeburst.io/long-term-caching-of-static-assets-with-webpack-1ecb139adb95?gi=9e32667ae5c5#.vtwnssps4
- title: Webpack & Caching
url: https://gist.github.com/sokra/ff1b0290282bfa2c037bdb6dcca1a7aa
- title: Advanced Webpack Presentation
Expand All @@ -23,7 +23,7 @@ related:

T> The examples in this guide stem from [getting started](/guides/getting-started), [output management](/guides/output-management) and [code splitting](/guides/code-splitting).

So we're using webpack to bundle our modular application which yields a deployable `/dist` directory. Once the contents of `/dist` have been deployed to a server, clients (typically browsers) will hit that server to grab the site and its assets. The last step can be time consuming, which is why browsers use a technique called [caching](http://searchstorage.techtarget.com/definition/cache). This allows sites to load faster with less unnecessary network traffic, however it can also cause headaches when you need new code to be picked up.
So we're using webpack to bundle our modular application which yields a deployable `/dist` directory. Once the contents of `/dist` have been deployed to a server, clients (typically browsers) will hit that server to grab the site and its assets. The last step can be time consuming, which is why browsers use a technique called [caching](https://searchstorage.techtarget.com/definition/cache). This allows sites to load faster with less unnecessary network traffic, however it can also cause headaches when you need new code to be picked up.

This guide focuses on the configuration needed to ensure files produced by webpack compilation can remain cached unless their contents has changed.

Expand Down
2 changes: 1 addition & 1 deletion src/content/guides/code-splitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ Once you start splitting your code, it can be useful to analyze the output to ch

- [webpack-chart](https://alexkuz.github.io/webpack-chart/): Interactive pie chart for webpack stats.
- [webpack-visualizer](https://chrisbateman.github.io/webpack-visualizer/): Visualize and analyze your bundles to see which modules are taking up space and which might be duplicates.
- [webpack-bundle-analyzer](https://github.com/th0r/webpack-bundle-analyzer): A plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap.
- [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer): A plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap.


## Next Steps
Expand Down
6 changes: 3 additions & 3 deletions src/content/guides/hot-module-replacement.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ W> __HMR__ is not intended for use in production, meaning it should only be used

This feature is great for productivity. All we need to do is update our [webpack-dev-server](https://github.com/webpack/webpack-dev-server) configuration, and use webpack's built in HMR plugin. We'll also remove the entry point for `print.js` as it will now be consumed by the `index.js` module.

T> If you took the route of using `webpack-dev-middleware` instead of `webpack-dev-server`, please use the [`webpack-hot-middleware`](https://github.com/glenjamin/webpack-hot-middleware) package to enable HMR on your custom server or application.
T> If you took the route of using `webpack-dev-middleware` instead of `webpack-dev-server`, please use the [`webpack-hot-middleware`](https://github.com/webpack-contrib/webpack-hot-middleware) package to enable HMR on your custom server or application.

__webpack.config.js__

Expand Down Expand Up @@ -162,7 +162,7 @@ server.listen(5000, 'localhost', () => {
});
```

T> If you're [using `webpack-dev-middleware`](/guides/development#using-webpack-dev-middleware), check out the [`webpack-hot-middleware`](https://github.com/glenjamin/webpack-hot-middleware) package to enable HMR on your custom dev server.
T> If you're [using `webpack-dev-middleware`](/guides/development#using-webpack-dev-middleware), check out the [`webpack-hot-middleware`](https://github.com/webpack-contrib/webpack-hot-middleware) package to enable HMR on your custom dev server.


## Gotchas
Expand Down Expand Up @@ -340,6 +340,6 @@ There are many other loaders and examples out in the community to make HMR inter
- [Vue Loader](https://github.com/vuejs/vue-loader): This loader supports HMR for vue components out of the box.
- [Elm Hot Loader](https://github.com/fluxxu/elm-hot-loader): Supports HMR for the Elm programming language.
- [Redux HMR](https://survivejs.com/webpack/appendices/hmr-with-react/#configuring-hmr-with-redux): No loader or plugin necessary! A simple change to your main store file is all that's required.
- [Angular HMR](https://github.com/AngularClass/angular-hmr): No loader necessary! A simple change to your main NgModule file is all that's required to have full control over the HMR APIs.
- [Angular HMR](https://github.com/gdi2290/angular-hmr): No loader necessary! A simple change to your main NgModule file is all that's required to have full control over the HMR APIs.

T> If you know of any other loaders or plugins that help with or enhance Hot Module Replacement please submit a pull request to add to this list!
4 changes: 2 additions & 2 deletions src/content/guides/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ See [#2986](https://github.com/webpack/webpack/issues/2986) for the reason behin
## `json-loader` is not required anymore

When no loader has been configured for a JSON file, webpack will automatically try to load the JSON
file with the [`json-loader`](https://github.com/webpack/json-loader).
file with the [`json-loader`](https://github.com/webpack-contrib/json-loader).

``` diff
module: {
Expand Down Expand Up @@ -283,7 +283,7 @@ Thus make sure to remove the plugin from your configuration:

## `ExtractTextWebpackPlugin` - breaking change

[ExtractTextPlugin](https://github.com/webpack/extract-text-webpack-plugin) requires version 2 to work with webpack 2.
[ExtractTextPlugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) requires version 2 to work with webpack 2.

`npm install --save-dev extract-text-webpack-plugin`

Expand Down
Loading