Skip to content

Commit 1ec86a1

Browse files
authored
Merge branch 'v2' into webext-name
2 parents d189d25 + 1cb1e7a commit 1ec86a1

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

src/languages/less.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Referencing a Less file in an HTML file:
2222
Importing a Less file as a CSS module in JavaScript or TypeScript:
2323

2424
```js
25-
import * as classes './style.module.less';
25+
import * as classes from './style.module.less';
2626

2727
document.body.className = classes.body;
2828
```

src/languages/stylus.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Referencing a Stylus file in an HTML file:
2222
Importing a Stylus file as a CSS module in JavaScript or TypeScript:
2323

2424
```js
25-
import * as classes './style.module.styl';
25+
import * as classes from './style.module.styl';
2626

2727
document.body.className = classes.body;
2828
```

src/languages/sugarss.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Referencing a SugarSS file in an HTML file:
2323
Importing a SugarSS file as a CSS module in JavaScript or TypeScript:
2424

2525
```js
26-
import * as classes './style.module.sss';
26+
import * as classes from './style.module.sss';
2727

2828
document.body.className = classes.body;
2929
```

src/plugin-system/overview.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ summary: A high-level overview over the plugin system
1919
Even if you aren't doing anything that complex, if you are going to use Parcel
2020
a lot it makes sense to take some time and understand how it works.
2121

22+
### Entities
23+
24+
- Asset: In the simplest case, an asset corresponds to a source file (e.g. a TypeScript file on disk). However, a transformer can not only modify (transform) an asset, but can also return more than one asset for a single input asset.
25+
- Dependency: A dependency models an asset requesting some other asset (e.g. a `import "foo";` declaration in JavaScript, or a `<link rel="stylesheet">` in HTML). They are explicitly added by a transformer (and sometimes called outgoing dependencies). Additionally Parcel also tracks which assets these dependencies point to and exposes this information as the incoming dependencies of an asset (thus listing the importers of some asset).
26+
- Bundle: A bundle is a grouping of assets that will be written into a single file for browsers to load. Async bundles are bundles created for lazy dependencies (e.g. for `import()` calls), and shared bundles contain assets used by multiple other bundles and were separated for improved load performance.
27+
2228
### Phases of Parcel
2329

2430
At a high level Parcel runs through several phases:
@@ -34,7 +40,7 @@ At a high level Parcel runs through several phases:
3440
The **resolving** and **transforming** phases work together in parallel to
3541
build a graph of all your assets.
3642

37-
The asset graph gets translated into bundles in the **bundling** phase. The output filename of each bundle is determined in the **naming** phase.
43+
The assets are grouped into bundles in the **bundling** phase. The output filename of each bundle is determined in the **naming** phase.
3844

3945
Then, the **packaging**, **optimizing**, and **compressing** phases work together to generate the final contents of every bundle, in parallel.
4046

@@ -55,9 +61,10 @@ on one another is called the "Asset Graph".
5561

5662
### Bundle Graph
5763

58-
Once Parcel has built the entire Asset Graph, it begins turning it into
59-
"bundles". These bundles are groupings of assets that get placed together in a
60-
single file. Bundles will (generally) contain only assets in the same language.
64+
Once Parcel has built the entire Asset Graph, it converts it into
65+
the Bundle Graph, which contains the Asset Graph and additionally describes
66+
which assets should be grouped together into bundles (and what the relationship
67+
between these bundles is).
6168

6269
Some assets are considered "entry" points into your app, and will stay as
6370
separate bundles. For example, if your `index.html` file links to an

0 commit comments

Comments
 (0)