Skip to content

Commit 5625983

Browse files
committed
Update Readme, Netlfiy and Assets Sections
1 parent 78828df commit 5625983

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ sh ./build-web.sh
1111

1212
You may need to change the path called depending on your repo structure or tools.
1313

14-
## Build Config Example (Netlify)
14+
## Build Config Example with Netlify
15+
> See it in action at [flutter-for-web-build-script-demo.netlify.app](https://flutter-for-web-build-script-demo.netlify.app/#)
16+
1517
Here is an example config for Netlify that would be stored in their `netlify.toml` file at the root directory of your repo. In a monorepo structure, you would only have to change `build` to point to your flutter app directory.
1618

1719
```bash
@@ -28,10 +30,14 @@ Here is an example config for Netlify that would be stored in their `netlify.tom
2830
command = "sh ./build-web.sh"
2931
```
3032

33+
[Netlify File-based configuration Docs](https://docs.netlify.com/configure-builds/file-based-configuration/#sample-file)
34+
3135
## How it works
32-
The script installs the beta version of Flutter to your deploy pipline container. If your build pipeline caches build artifacts Flutter will only be downloaded once.
36+
The script installs the beta version of Flutter to your deploy pipeline container. If your build pipeline caches build artifacts Flutter will only be downloaded once.
3337

3438
## Assets
35-
Flutter for web moves your static assets under a new `/assets/` folder. The path in the sever looks like `/assets/myAssets/*`. This results in some 404 errors.
39+
Flutter for web moves your static assets listed in the app's `pubspec.yaml` under a new `/assets/` folder. Flutter only does this during build, not development mode.
40+
41+
The path in your web app bundle looks now like `/assets/myAssets/...`. This results in your app having many 404 errors.
3642

37-
The script assumes you have an `/assets` folder in your project where your images and other static assets are stored and copies them to the expected location.
43+
To make the web file structure match that of your iOS or Android app, the build script makes a copy of the new `/assets` folder and places them in your project's root folder, mirroring what is found in Flutter's development mode.

0 commit comments

Comments
 (0)