question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add more declarative way of adding/removing assets for fastboot

See original GitHub issue

Problem: 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: image

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:closed
  • Created 6 years ago
  • Reactions:10
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
kratiahujacommented, Jun 1, 2017

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.

0reactions
kratiahujacommented, Nov 13, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Summary
When FastBoot was doing two builds (to generate different assets for browser and Node environment), addon or apps often conditionally imported ...
Read more >
EmberConf 2021 Notes - Alex DiLiberto
Here is a highlighted overview of the major points from some of my favorite EmberConf 2021 talks: Conference.
Read more >
ember-modifier
This addon provides an API for authoring element modifiers in Ember. It mirrors Ember's helper API, with variations for writing both simple ...
Read more >
[META] Start using reactive declarative JS programming for ...
Due to selective asset loading, this change would not break BC; any modules that wish to use the new framework can simply remove...
Read more >
ES Classes in Ember.js
This addon adds babel transforms for decorators and class fields and ... In addition, init does not work with legacy versions of Ember...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found