Skip to content

Commit 48db7c3

Browse files
royairmontogeek
authored andcommitted
docs(guides) replace 'bundle.js' with 'main.js' in examples (#2136)
'npx webpack' default output file 'main.js', while in examples 'bundle.js' is being used. corrected examples accordingly.
1 parent 97d9032 commit 48db7c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/guides/getting-started.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ __dist/index.html__
178178

179179
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.
180180

181-
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:
181+
With that said, let's run `npx webpack` with our script as the [entry point](/concepts/entry-points) and `main.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:
182182

183183
``` bash
184184
npx webpack
@@ -188,8 +188,8 @@ Version: webpack 4.0.1
188188
Time: 3003ms
189189
Built at: 2018-2-26 22:42:11
190190
Asset Size Chunks Chunk Names
191-
bundle.js 69.6 KiB 0 [emitted] main
192-
Entrypoint main = bundle.js
191+
main.js 69.6 KiB 0 [emitted] main
192+
Entrypoint main = main.js
193193
[1] (webpack)/buildin/module.js 519 bytes {0} [built]
194194
[2] (webpack)/buildin/global.js 509 bytes {0} [built]
195195
[3] ./src/index.js 256 bytes {0} [built]
@@ -208,7 +208,7 @@ Open `index.html` in your browser and, if everything went right, you should see
208208

209209
The [`import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) and [`export`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) statements have been standardized in [ES2015](https://babeljs.io/learn-es2015/). Although they are not supported in most browsers yet, webpack does support them out of the box.
210210

211-
Behind the scenes, webpack actually "transpiles" the code so that older browsers can also run it. If you inspect `dist/bundle.js`, you might be able to see how webpack does this, it's quite ingenious! Besides `import` and `export`, webpack supports various other module syntaxes as well, see [Module API](/api/module-methods) for more information.
211+
Behind the scenes, webpack actually "transpiles" the code so that older browsers can also run it. If you inspect `dist/main.js`, you might be able to see how webpack does this, it's quite ingenious! Besides `import` and `export`, webpack supports various other module syntaxes as well, see [Module API](/api/module-methods) for more information.
212212

213213
Note that webpack will not alter any code other than `import` and `export` statements. If you are using other [ES2015 features](http://es6-features.org/), make sure to [use a transpiler](/loaders/#transpiling) such as [Babel](https://babeljs.io/) or [Bublé](https://buble.surge.sh/guide/) via webpack's [loader system](/concepts/loaders/).
214214

0 commit comments

Comments
 (0)