Add more declarative way of adding/removing assets for fastboot
See original GitHub issueProblem: The current guide to migrating fastboot is very helpful, but requires understanding far more about broccoli and the fastboot manifest than in the past. Because of the increased knowledge, updating an addon to be compatible with fastboot 1.0 is challenging. Ryan had an experience similar to mine:
Specifically, the migration paths that have proved the most challenging are importing in fastboot build and importing for a browser build. Look at the first two uses cases in the upgrading gist for more.
This problem also affects developers seeking to make their apps compatible for fastboot by including or excluding libs for fastboot.
Goals: While having low level primitives is very useful for edge cases, creating a more declarative api for including an asset for browser or fastboot would make the migration easier and reduce the amount of knowledge addons authors have to learn. By lowering the barriers, new addons will be more likely to be fastboot compat out of the gate and existing addons will be more quickly migrated.
Ideally, a solution would:
- require no new broccoli plugins like broccoli-stew
- require no knowledge of the fastboot manifest
- require no knowledge of the fastboot broccoli callback (
updateFastBootManifest
)
A possible solution: I’m not knowledgable enough of ember-cli to know the best path forward, but as a novice, I’d love to see something like:
// If not specified, "importInFastBoot" would be `true`
// and all imported assets would be included in a fastboot build
app.import("filename.js", {importInFastBoot: false})
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:6 (4 by maintainers)
Top GitHub Comments
I’ll take a stab at this over the weekend. I have an idea in my mind but want to spike out and think aloud.
The new API to make easy for apps to import fastboot incompatible libraries is merged. For addon, I will provide an API in
fastboot-transform
and is being tracking here: https://github.com/kratiahuja/fastboot-transform/issues/7.Going to close this.