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.

FastBoot undefined in ember-cli-build.js

See original GitHub issue

Not sure if this is an issue. Might be more like a question.

I used to have this code in my ember-cli-build.js. This was removed in RC1:

if (!process.env.EMBER_CLI_FASTBOOT) {
  app.import('bower_components/lib.js');
}

I am trying to upgrade to the newest version and the readme states that a global variable FastBoot is available in ember-cli-build.js However the code below does not work:

if (typeof FastBoot === 'undefined') {
  app.import('bower_components/lib.js');
}

Should FastBoot be defined here? Is there a different hook that I should be using? If so, what file is this hook in?

I am using 1.0.0-rc.4. Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kratiahujacommented, Jun 22, 2017

@edance Currently that is not possible unless you create an in-repo addon. I have an RFC to expose a better API to allow apps to do this as well. But the alternative currently is create an in-repo addon in your app and do the import there just like any other addon.

0reactions
sebyx07commented, Jul 5, 2017

copy the js file to the public directory ex public/js/file.js, then use a script src from index.html. Or import the file from a cdn directly

Read more comments on GitHub >

github_iconTop Results From Across the Web

ember 2.3.0 and ember-cli-fastboot raise `document is not ...
when trying to launch ember fastboot I've got: DEBUG=ember-cli-fastboot:* ember fastboot --serve-assets version: 2.2.0-beta.6 Built project ...
Read more >
Prember + ember-cli-fastboot getting $ is not defined on ...
Hey, I am trying to set up Prember (GitHub - ef4/prember: Prerender Ember apps with Fastboot at build time.) to allow only my...
Read more >
Brocolli Plugin ENOENT no such file auto-import-fastboot.js error
I randomly get the following error message when running the tests on an ember project, it doesn't happen all the time.
Read more >
ember-auto-import
In your ember-cli-build.js file let app = new EmberApp(defaults, { autoImport: { alias: { // when the app tries to import from "plotly.js", ......
Read more >
updating ember cli addons for fastboot 1.0
if typeof Fastboot === 'undefined' ... what about ember-cli-build.js ? The Fastboot variable is not available in ember-cli-build.js.
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