Skip to content

您 -> 你 & 统一为:本指南继续沿用[xxx](/guides/xxx)中的代码示例 #440

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 134 commits into from
Jan 13, 2018
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
f2a258a
update /content/loaders & /content/plugins
hello-lizhihua Sep 3, 2017
a5725bb
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Sep 3, 2017
248be26
update /content/loaders & /content/plugins
hello-lizhihua Sep 19, 2017
36c53b8
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Sep 19, 2017
25a3d6d
Merge branch 'master' into cn
hello-lizhihua Oct 10, 2017
14bff9f
update /content/loaders & /content/plugins
hello-lizhihua Oct 10, 2017
debfddd
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Oct 10, 2017
57fb4d4
update contributors
hello-lizhihua Oct 10, 2017
99bf48d
Merge branch 'master' into translation
hello-lizhihua Oct 10, 2017
7fcd796
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Oct 11, 2017
78e3cee
update /content/loaders & /content/plugins
hello-lizhihua Oct 15, 2017
8a1b2c9
Merge branch 'master' into translation
hello-lizhihua Oct 15, 2017
34575cd
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Oct 15, 2017
3251e8a
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Oct 15, 2017
7396c0d
Merge branch 'master' into cn
hello-lizhihua Oct 15, 2017
c0dc1be
fix LinkDropdown
hello-lizhihua Oct 15, 2017
4809e4a
Merge branch 'translation' into cn
hello-lizhihua Oct 15, 2017
178eeeb
修复 npm 命令错误导致编译不成功的问题
hello-lizhihua Oct 17, 2017
8ec33ad
update /content/loaders & /content/plugins
hello-lizhihua Oct 17, 2017
cc7b5e1
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Oct 17, 2017
93ebe40
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Oct 29, 2017
1ca293a
update /content/loaders & /content/plugins
hello-lizhihua Oct 30, 2017
a132154
Merge branch 'master' into translation
hello-lizhihua Oct 30, 2017
9fbf758
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Oct 30, 2017
a40704a
update /content/loaders & /content/plugins
hello-lizhihua Nov 1, 2017
53d47d1
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Nov 1, 2017
68c4bdd
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Nov 1, 2017
d622470
docs(plugins): fix typo in module-concatenation-plugin.md (#1683)
mattdsteele Nov 1, 2017
52eb2a4
docs(concepts): simplify the introduction (#1673)
TheDutchCoder Nov 1, 2017
6e8d65d
docs(plugins): add “scope hoisting” intro in module-concatenation-plu…
iamakulov Nov 3, 2017
66443e6
docs(api): fix some method signatures in loaders.md (#1685)
aparajita Nov 3, 2017
b13613e
update /content/loaders & /content/plugins
Nov 4, 2017
0e407de
Merge remote-tracking branch 'upstream/translation' into translation
Nov 4, 2017
d6295cc
Merge remote-tracking branch 'upstream/master'
Nov 4, 2017
955b221
docs(guides): consistent quoute use in typescript.md (#1687)
ulrikstrid Nov 5, 2017
ac739ee
docs(api/guides): document new --concatenate-modules flag (#1686)
iamakulov Nov 5, 2017
6d30cac
docs(guides): fix issues with examples in shimming.md (#1680)
svyandun Nov 5, 2017
ccac872
docs(guides): add middleware tip to the hmr guide
skipjack Nov 5, 2017
5dcd8ac
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Nov 5, 2017
0f539cb
Merge remote-tracking branch 'upstream/master'
hello-lizhihua Nov 5, 2017
c71abf9
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Nov 5, 2017
c9cdb7e
Revert "A new --concatenate-modules flag" (#1692)
skipjack Nov 5, 2017
ebd64c9
update master
hello-lizhihua Nov 6, 2017
796d087
Merge remote-tracking branch 'upstream/master'
hello-lizhihua Nov 6, 2017
4a2422b
Merge branch 'master' into cn
hello-lizhihua Nov 6, 2017
fe130ff
update master
hello-lizhihua Nov 6, 2017
19fc4f6
update /content/loaders & /content/plugins
hello-lizhihua Nov 7, 2017
b9d59a4
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Nov 7, 2017
38fc0d4
Merge branch 'translation' into cn
hello-lizhihua Nov 7, 2017
34dd7b4
docs(concepts): fix grammar in output.md (#1694)
reergymerej Nov 10, 2017
29899d8
docs(contribute): update writing-a-loader (#1691)
ThaNarie Nov 10, 2017
5a7cbe7
docs(plugins): add external example in SourceMapDevToolPlugin (#1676)
hkrutzer Nov 10, 2017
4760409
docs(config): update dev-server open option (#1693)
applemate Nov 11, 2017
63574ba
fix bugs
hello-lizhihua Nov 12, 2017
192c38e
update /content/loaders & /content/plugins
hello-lizhihua Nov 12, 2017
1511650
docs(api): improve formatting and grammar in loaders.md
skipjack Nov 11, 2017
ab6f188
docs(api): clarify fourth parameter of `this.callback` in loaders.md
skipjack Nov 11, 2017
e6c94a4
docs(api): populate missing link in loaders.md
skipjack Nov 12, 2017
4b80c8b
docs(plugins): correct example in html-webpack-plugin (#1698)
Jocs Nov 13, 2017
b24ea5e
docs(guides): update an example in production.md (#1696)
ogonkov Nov 13, 2017
0fb8a35
fix(markdown): fix overflowing inline code (#1701)
kamleshchandnani Nov 15, 2017
251f704
docs(concepts): update concepts wording (#1702)
TheLarkInn Nov 15, 2017
4f2f269
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Nov 18, 2017
c5142de
Merge remote-tracking branch 'upstream/master'
hello-lizhihua Nov 18, 2017
5a59bb7
update /content/loaders & /content/plugins
hello-lizhihua Nov 18, 2017
8597638
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Nov 18, 2017
4d2e2b8
docs(config): fix dead link to webpack-dev-server example (#1704)
loilo Nov 19, 2017
549d14c
docs(concepts): use fragment links in usage instructions (#1705)
CentroDL Nov 19, 2017
9f473f5
docs(guides): add windows usage tip in getting-started (#1671)
Vanguard90 Nov 23, 2017
b8e8365
doc(guides): fix grammatical error in build-performance (#1709)
davesidious Nov 23, 2017
067cb0d
docs(guides): correct two small typos
mbsrc Nov 21, 2017
e57a11b
docs(api): remove inadvertent double verb (#1714)
MajorBreakfast Nov 23, 2017
2efe399
docs(contribute): fix grammar in writing-a-plugin (#1715)
MajorBreakfast Nov 23, 2017
05714b5
docs(config): add semicolon for consistency (#1716)
connorholyday Nov 26, 2017
93e4b4d
docs(contributing): add note about debian OS (#1721)
sukrosono Dec 2, 2017
4eefcee
docs(guides): add output example to shimming doc (#1720)
agudulin Dec 2, 2017
afe298d
docs(plugins): use `.includes` over `.indexOf` (#1719)
mattvagni Dec 2, 2017
955ff3f
docs(guides): use `npx` in getting-started (#1708)
MajorBreakfast Dec 2, 2017
efcce14
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Dec 3, 2017
0f36909
Merge remote-tracking branch 'upstream/master'
hello-lizhihua Dec 3, 2017
27991dc
update /src/content/loaders & /src/content/plugins
hello-lizhihua Dec 3, 2017
3ff5dfe
Merge remote-tracking branch 'upstream/translation' into translation
hello-lizhihua Dec 3, 2017
1e898cb
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Dec 3, 2017
46e6781
Merge branch 'translation' into cn
hello-lizhihua Dec 3, 2017
4fe9b6f
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Dec 4, 2017
b5f821d
Merge branch 'master' into cn
hello-lizhihua Dec 4, 2017
8a3c989
docs(contribute): link compiler docs in writing-a-plugin (#1700)
chrmod Dec 5, 2017
968c0d1
docs(guides): fix `source-map` discrepancy in production.md (#1711)
mbsrc Dec 5, 2017
e911daf
docs(guides): rename 'runtime' to 'manifest' in caching.md (#1713)
mbsrc Dec 5, 2017
3d3ab97
docs(guides): update output to webpack 3.9.1 (#1724)
plug-n-play Dec 5, 2017
a4bdaa2
docs(plugins): update the source-map-devtool-plugin (#1707)
EugeneHlushko Dec 5, 2017
5ff8058
docs(contribute): correct an example in the writers-guide (#1727)
lhoff Dec 5, 2017
4d82b1c
docs(config): improve formatting and add note about library entry poi…
skipjack Dec 6, 2017
f0b140a
docs(guides): mention complex entry point configuration in author-lib…
skipjack Dec 6, 2017
099d928
docs(config): improve formatting and clarify the string usage in exte…
skipjack Dec 6, 2017
d6dee86
docs(config): fix minor proselint error in externals
skipjack Dec 6, 2017
c0db521
docs(api): clarify the `pitch` method and how it can be used in loade…
skipjack Dec 6, 2017
9e77d93
docs(contribute): fix `import` statement in writing-a-loader.md (#1732)
sanchitnevgi Dec 8, 2017
2c47976
docs(config): update devtool production recommendations
neonick Dec 6, 2017
9b8653f
docs(api): remove obsolete cli flag (#1733)
ooflorent Dec 9, 2017
8b5fd79
docs(concepts): add warning about incompatible `import` statements
skipjack Dec 9, 2017
4902981
docs(config): fix typescript setup in configuration-languages (#1734)
youta1119 Dec 11, 2017
093722e
docs: use full `npm install` over `npm i` (#1740)
Chocobo1 Dec 14, 2017
1c17320
docs(guides): fix diff display for webpack.config.js entry object
JGJP Dec 14, 2017
4405fee
docs: fix typos
tbroadley Dec 16, 2017
df39d5f
docs: add tbroadley to contributor lists
tbroadley Dec 16, 2017
7018c23
docs(contribute): correct schema example in `writing-a-loader.md` (#1…
warmrobot Dec 18, 2017
f0ffd1f
docs(guides): add pwa guide (#1737)
johnnyreilly Dec 18, 2017
41615e4
docs(guides): highlight css splitting in production
skipjack Dec 18, 2017
1b5cf43
docs(plugins): use `.includes` over `.indexOf`
baldurh Dec 18, 2017
41a5096
docs(config): omit invalid `detailed` option in stats.md (#1757)
Dec 20, 2017
7078bd7
fix(mobile): correctly sort pages in mobile sidebar (#1759)
pierreneter Dec 20, 2017
a5566a1
chore(vote): port voting app, update deps, and simplify config (#1717)
skipjack Dec 23, 2017
679ed0a
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Dec 23, 2017
e8b2e06
Merge remote-tracking branch 'upstream/master'
hello-lizhihua Dec 23, 2017
0d6cb2e
docs(readme): reformat at 80 characters and include browserstack link
skipjack Dec 22, 2017
aceaf6e
refactor(notification): simplify notification message and bump the ve…
skipjack Dec 26, 2017
fd4548f
fix(splash): fix visualization artifacts (#1762)
pierreneter Dec 27, 2017
1ec37d9
chore: pick up vote fix and update yarn lock file
skipjack Dec 27, 2017
6e06115
chore(vote): pick up another vote patch
skipjack Dec 28, 2017
f375e60
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Dec 28, 2017
eb02652
Update index.md (#423)
DanielXH Dec 28, 2017
cd39b03
Update .travis.yml
hello-lizhihua Dec 29, 2017
9a14935
docs: fix formatting and grammar (#1765)
yangshun Jan 7, 2018
232bf00
docs(concepts): change loader order from chonological to reverse (#1767)
Jan 7, 2018
e5a36ae
Merge remote-tracking branch 'upstream/master'
hello-lizhihua Jan 13, 2018
17e1fc8
Merge branch 'master' into cn
hello-lizhihua Jan 13, 2018
c46b22a
update UPDATE.md
hello-lizhihua Jan 13, 2018
7d79c30
https://github.com/webpack-china/webpack.js.org/pull/422
hello-lizhihua Jan 13, 2018
48d38a0
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Jan 13, 2018
8685372
https://github.com/webpack-china/webpack.js.org/issues/40
hello-lizhihua Jan 13, 2018
7e71b5d
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Jan 13, 2018
8fb61a3
您 -> 你 & 统一为:本指南继续沿用[xxx](/guides/xxx)中的代码示例
hello-lizhihua Jan 13, 2018
be132a2
Merge remote-tracking branch 'upstream/cn' into cn
hello-lizhihua Jan 13, 2018
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: 2 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ See the `package.json` for the full list of `scripts`.

> Note that a __Python version between v2.5.0 and 3.0.0__ is required for the [proselint][12] dependency.

> On Debian and Ubuntu operating systems you may have to use `node >= 7.0.0` to avoid build errors with `node-sass`. Please note that we don't officially support building on these systems.


## Contributor License Agreement

Expand Down
2 changes: 1 addition & 1 deletion src/content/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ While most users can get away with just using the CLI along with a configuration

## Loaders

Loaders are transformations that are applied to the source code of a module. They are written as functions that take accept source code as a parameter and return a new version of that code with tranformations applied.
Loaders are transformations that are applied to the source code of a module. They are written as functions that accept source code as a parameter and return a new version of that code with tranformations applied.

[Learn more!](/api/loaders)

Expand Down
6 changes: 3 additions & 3 deletions src/content/concepts/loaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ module.exports = {

There are three ways to use loaders in your application:

* Configuration (recommended): Specify them in your __webpack.config.js__ file.
* Inline: Specify them explicitly in each `import` statement.
* CLI: Specify them within a shell command.
* [Configuration](#configuration) (recommended): Specify them in your __webpack.config.js__ file.
* [Inline](#inline): Specify them explicitly in each `import` statement.
* [CLI](#cli): Specify them within a shell command.


### Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/content/configuration/dev-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Content not from webpack is served from /path/to/dist/

that will give some background on where the server is located and what it's serving.

If you're using dev-server through the Node.js API, the options in `devServer` will be ignored. Pass the options as a second parameter instead: `new WebpackDevServer(compiler, {...})`. [See here](https://github.com/webpack/webpack-dev-server/blob/master/examples/node-api-simple/server.js) for an example of how to use webpack-dev-server through the Node.js API.
If you're using dev-server through the Node.js API, the options in `devServer` will be ignored. Pass the options as a second parameter instead: `new WebpackDevServer(compiler, {...})`. [See here](https://github.com/webpack/webpack-dev-server/tree/master/examples/api/simple) for an example of how to use webpack-dev-server through the Node.js API.

W> Be aware that when [exporting multiple configurations](/configuration/configuration-types/#exporting-multiple-configurations) only the `devServer` options for the first configuration will be taken into account and used for all the configurations in the array.

Expand Down
2 changes: 1 addition & 1 deletion src/content/configuration/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ plugins: [
A more complex example, using multiple plugins, might look something like this:

```js
var webpack = require('webpack')
var webpack = require('webpack');
// importing plugins that do not come by default in webpack
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var DashboardPlugin = require('webpack-dashboard/plugin');
Expand Down
2 changes: 1 addition & 1 deletion src/content/contribute/writing-a-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ This is the simplest format for a plugin. Many useful events like `"compile"`, `

`applyPluginsWaterfall(name: string, init: any, args: any...)`

Here each of the plugins are called one after the other with the args from the return value of the previous plugin. The plugin must take into consider the order of its execution.
Here each of the plugins are called one after the other with the args from the return value of the previous plugin. The plugin must take the order of its execution into account.
It must accept arguments from the previous plugin that was executed. The value for the first plugin is `init`. This pattern is used in the Tapable instances which are related to the `webpack` templates like `ModuleTemplate`, `ChunkTemplate` etc.

- __asynchronous__ When all the plugins are applied asynchronously using
Expand Down
2 changes: 1 addition & 1 deletion src/content/guides/build-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Use the `DllPlugin` to move code that is changed less often into a separate comp

Decrease the total size of the compilation to increase build performance. Try to keep chunks small.

- Use less/smaller libraries.
- Use fewer/smaller libraries.
- Use the `CommonsChunksPlugin` in Multi-Page Applications.
- Use the `CommonsChunksPlugin` in `async` mode in Multi-Page Applications.
- Remove unused code.
Expand Down
11 changes: 7 additions & 4 deletions src/content/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ contributors:
- jecoopr
- TheDutchCoder
- sudarsangp
- Vanguard90
---

As you may already know, webpack is used to compile JavaScript modules. Once [installed](/guides/installation), you can interface with webpack either from its [CLI](/api/cli) or [API](/api/node). If you're still new to webpack, please read through the [core concepts](/concepts) and [this comparison](/comparison) to learn why you might use it over the other tools that are out in the community.
Expand Down Expand Up @@ -140,10 +141,10 @@ __dist/index.html__

In this setup, `index.js` explicitly requires `lodash` to be present, and binds it as `_` (no global scope pollution). By stating what dependencies a module needs, webpack can use this information to build a dependency graph. It then uses the graph to generate an optimized bundle where scripts will be executed in the correct order.

With that said, let's run `webpack` with our script as the [entry point](/concepts/entry-points) and `bundle.js` as the [output](/concepts/output):
With that said, let's run `npx webpack` with our script as the [entry point](/concepts/entry-points) and `bundle.js` as the [output](/concepts/output). The `npx` command, which ships with Node 8.2 or higher, runs the webpack binary (`./node_modules/.bin/webpack`) of the webpack package we installed in the beginning:

``` bash
./node_modules/.bin/webpack src/index.js dist/bundle.js
npx webpack src/index.js dist/bundle.js

Hash: ff6c1d39b26f89b3b7bb
Version: webpack 2.2.0
Expand Down Expand Up @@ -203,7 +204,7 @@ module.exports = {
Now, let's run the build again but instead using our new configuration:

``` bash
./node_modules/.bin/webpack --config webpack.config.js
npx webpack --config webpack.config.js

Hash: ff6c1d39b26f89b3b7bb
Version: webpack 2.2.0
Expand All @@ -216,6 +217,8 @@ bundle.js 544 kB 0 [emitted] [big] main
[3] ./src/index.js 278 bytes {0} [built]
```

W> Note that when calling `webpack` via its path on windows, you must use backslashes instead, e.g. `node_modules\.bin\webpack --config webpack.config.js`.

T> If a `webpack.config.js` is present, the `webpack` command picks it up by default. We use the `--config` option here only to show that you can pass a config of any name. This will be useful for more complex configurations that need to be split into multiple files.

A configuration file allows far more flexibility than simple CLI usage. We can specify loader rules, plugins, resolve options and many other enhancements this way. See the [configuration documentation](/configuration) to learn more.
Expand All @@ -237,7 +240,7 @@ __package.json__
}
```

Now the `npm run build` command can be used in place of the longer commands we used earlier. Note that within `scripts` we can reference locally installed npm packages by name instead of writing out the entire path. This convention is the standard in most npm-based projects and allows us to directly call `webpack`, instead of `./node_modules/.bin/webpack`
Now the `npm run build` command can be used in place of the `npx` command we used earlier. Note that within `scripts` we can reference locally installed npm packages by name the same way we did with `npx`. This convention is the standard in most npm-based projects because it allows all contributors to use the same set of common scripts (each with flags like `--config` if necessary).

Now run the following command and see if your script alias works:

Expand Down
10 changes: 9 additions & 1 deletion src/content/guides/shimming.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,15 @@ What we've essentially done here is tell webpack...
If we run a build, we should still see the same output:

``` bash
TODO: Include output
Hash: f450fa59fa951c68c416
Version: webpack 2.2.0
Time: 343ms
Asset Size Chunks Chunk Names
bundle.js 544 kB 0 [emitted] [big] main
[0] ./~/lodash/lodash.js 540 kB {0} [built]
[1] (webpack)/buildin/global.js 509 bytes {0} [built]
[2] (webpack)/buildin/module.js 517 bytes {0} [built]
[3] ./src/index.js 189 bytes {0} [built]
```

We can also use the `ProvidePlugin` to expose a single export of a module by configuring it with an "array path" (e.g. `[module, child, ...children?]`). So let's imagine we only wanted to provide the `join` method from `lodash` wherever it's invoked:
Expand Down
4 changes: 2 additions & 2 deletions src/content/guides/tree-shaking.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function cube(x) {
}
```

With that in place, let's update our entry script to utilize this one of these new methods and remove `lodash` for simplicity:
With that in place, let's update our entry script to utilize one of these new methods and remove `lodash` for simplicity:

__src/index.js__

Expand Down Expand Up @@ -185,6 +185,6 @@ So, what we've learned is that in order to take advantage of _tree shaking_, you
- Use ES2015 module syntax (i.e. `import` and `export`).
- Include a minifier that supports dead code removal (e.g. the `UglifyJSPlugin`).

You can imagine your application as a tree. The source code and libraries you actually use represent the green, living leaves of the tree. Dead code represents the brown, dead leaves of the tree that are consumed by autumn. In order to get rid of the dead leaves, you have to shake the tree, causing them fall.
You can imagine your application as a tree. The source code and libraries you actually use represent the green, living leaves of the tree. Dead code represents the brown, dead leaves of the tree that are consumed by autumn. In order to get rid of the dead leaves, you have to shake the tree, causing them to fall.

If you are interested in more ways to optimize your output, please jump to the next guide for details on building for [production](/guides/production).
2 changes: 1 addition & 1 deletion src/content/plugins/commons-chunk-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ new webpack.optimize.CommonsChunkPlugin({
name: "vendor",
minChunks: function (module) {
// this assumes your vendor imports exist in the node_modules directory
return module.context && module.context.indexOf("node_modules") !== -1;
return module.context && module.context.includes("node_modules");
}
})
```
Expand Down