-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: assetsPackaging, accessing, or using assetsPackaging, accessing, or using assetsa: buildBuilding flutter applications with the toolBuilding flutter applications with the toolfound in release: 3.19Found to occur in 3.19Found to occur in 3.19found in release: 3.20Found to occur in 3.20Found to occur in 3.20has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
If you are working on a package with an example/ directory, you usually declare the parent folder as a package dependency. Making changes to the package assets and running flutter build web in the consumer package (example/) won't include the assets in the build. I needed to run flutter clean followed by flutter build web to see the assets included in my build folder.
Steps to reproduce
- Create a Flutter package
- Create new Flutter app
example/ - Run
flutter build webinexample/ - Add an asset to
pubspec.yamlin the parent package:
flutter:
assets:
- lib/my_script.js
- Run
flutter build webinexample/ - Observe
build/web/assets/directory doesn't contain the new asset - Run
flutter clean - (edit by @andrewkolos) Run
flutter build webagain - Observe the
build/web/assetsdirectory now contains the asset
pvditto
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: assetsPackaging, accessing, or using assetsPackaging, accessing, or using assetsa: buildBuilding flutter applications with the toolBuilding flutter applications with the toolfound in release: 3.19Found to occur in 3.19Found to occur in 3.19found in release: 3.20Found to occur in 3.20Found to occur in 3.20has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team