Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 8053f04

Browse files
committed
Revert "Add docs for --legacy flag (#1209)"
This reverts commit 66622d5.
1 parent a5a421f commit 8053f04

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

site/content/docs/09-building.md

+1-18
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,4 @@ The output is a Node app that you can run from the project root:
1212

1313
```bash
1414
node __sapper__/build
15-
```
16-
17-
### Browser support
18-
19-
Your site is built only for the latest versions of modern evergreen browsers by default. If you are using Rollup, you can use the `--legacy`[1] flag to build a second bundle that can be used to support legacy browsers like Internet Explorer. Sapper will then serve up the correct bundle at runtime[2].
20-
21-
When using `--legacy`, Sapper will pass an environment variable `SAPPER_LEGACY_BUILD` to your Rollup config. Sapper will then build your client-side bundle twice: once with `SAPPER_LEGACY_BUILD` set to `true` and once with it set to `false`. [sapper-template-rollup](https://github.com/sveltejs/sapper-template-rollup) provides an example of utilizing this configuration.[3]
22-
23-
You may wish to add this flag to a script in your `package.json`:
24-
```
25-
"scripts": {
26-
"build": "sapper build --legacy",
27-
},
28-
```
29-
30-
[1] This option is unrelated to Svelte's `legacy` option
31-
[2] Browsers which do not support `async/await` syntax will be served the legacy bundle
32-
[3] You will also need to polyfill APIs that are not present in older browsers.
15+
```

0 commit comments

Comments
 (0)