From 41216572e3eee906fed86fb18b331e3c05de44fc Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 21 Jul 2017 08:46:47 +0200 Subject: [PATCH 1/2] docs(getting-started): refine module section * bring together related sentences * add links to further documentation --- content/guides/getting-started.md | 6 +++--- content/loaders/index.md | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/content/guides/getting-started.md b/content/guides/getting-started.md index 5fb18bb51cf6..3ab439e33fe1 100644 --- a/content/guides/getting-started.md +++ b/content/guides/getting-started.md @@ -160,11 +160,11 @@ T> Your output may vary a bit, but if the build is successful then you are good Open `index.html` in your browser and, if everything went right, you should see the following text: 'Hello webpack'. -## ES2015 Modules +## Modules -Although `import` and `export` statements are not supported in most browsers (yet), webpack does support them. 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! +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/) and are not supported in most browsers (yet), webpack does support them. 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). -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 such as [Babel](https://babeljs.io/) or [Bublé](https://buble.surge.sh/guide/). See our [Module API](/api/module-methods) documentation for information on the various module syntaxes supported by webpack. +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/). ## Using a Configuration diff --git a/content/loaders/index.md b/content/loaders/index.md index 25e4a52be34e..38fe849649d7 100644 --- a/content/loaders/index.md +++ b/content/loaders/index.md @@ -30,6 +30,7 @@ Loaders are activated by using `loadername!` prefixes in `require()` statements, * [`script-loader`](/loaders/script-loader) Executes a JavaScript file once in global context (like in script tag), requires are not parsed * [`babel-loader`](/loaders/babel-loader) Loads ES2015+ code and transpiles to ES5 using [Babel](https://babeljs.io/) +* `buble-loader` Loads ES2015+ code and transpiles to ES5 using [Bublé](https://buble.surge.sh/guide/) * `traceur-loader` Loads ES2015+ code and transpiles to ES5 using [Traceur](https://github.com/google/traceur-compiler#readme) * [`ts-loader`](https://github.com/TypeStrong/ts-loader) or [`awesome-typescript-loader`](https://github.com/s-panferov/awesome-typescript-loader) Loads [TypeScript](https://www.typescriptlang.org/) 2.0+ like JavaScript * [`coffee-loader`](/loaders/coffee-loader) Loads [CoffeeScript](http://coffeescript.org/) like JavaScript From b2b3bb7f210f5cefa443bd517756702deb6c596f Mon Sep 17 00:00:00 2001 From: Greg Venech Date: Mon, 24 Jul 2017 22:12:07 -0400 Subject: [PATCH 2/2] docs(getting-started): split long line --- content/guides/getting-started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/guides/getting-started.md b/content/guides/getting-started.md index 3ab439e33fe1..1ba4171d5a9e 100644 --- a/content/guides/getting-started.md +++ b/content/guides/getting-started.md @@ -162,7 +162,9 @@ Open `index.html` in your browser and, if everything went right, you should see ## Modules -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/) and are not supported in most browsers (yet), webpack does support them. 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). +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. + +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. 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/).