-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embroider + Fastboot: dist
folder doesn't include <app-name>.js file
#184
Comments
dist
folder doesn't include <app>.js file. App file is needed for fastboot. dist
folder doesn't include <app-name>.js file
One thing that is different about embroider vs classic ember-cli is that embroider does not expose control over the set of bundles that will appear in the output. It's deliberately abstracted, so that stage3 has the maximum freedom to optimize. While we wouldn't want to "evaluate" index.html, we can certainly parse it and discover all the scripts that match up with assets on disk. That is the real ground truth for which scripts are needed to boot the app. I think that is the kind of interface we want to use going forward. The compatibility system can deal with the fact that existing apps will be surprised to have some of their scripts evaluated in node by annotating them or adding fastboot guards to them. |
Thank you @ef4. I used the wrong term - "evaluate". I was referring to parsing. Your above suggestion looks good regarding checking the file name and comparing to files on disk. I think this parsing should happen as part of the build and update fastboot manifest instead of happening during runtime. I was wondering what will be a good way to know when the build is complete. |
There are a few possibilities here. One is to make embroider generate the fastboot manifest. It would happen right after the stage3 packager has finished. Another is to extend fastboot to not need a manifest. IMO it's conceptually cleaner to make fastboot start from the HTML, the same way the browser does. I know that there are fastboot-only scripts that appear in the manifest and not index.html, but we can express that with dynamic imports. This is good because it avoids making fastboot so special. Tooling that understands dynamic imports (a standard Javascript feature) will understand that we have these particular modules that may load sometimes but not others. It would be good to get feedback from people who helped design the original fastboot manifest. Does it do more things that I'm not thinking of here? |
This is still happening with The curious thing is that application boots in browser, the source code is provided by |
is this still happening? 😅 |
After fixing issue #160, Noticed the embroider build doesn't include
<app-name>.js
file in thedist
location. As a result, fastboot application fails with following error:my-ebroider-test
is the app name.Is there a way build can provide list of APP files that is loaded in index.html. I initially explored idea of evaluating index.html, but that may not be a good idea as html file can include browser specific script files such as impression tracking.
@stefanpenner @ef4 @rwjblue
The text was updated successfully, but these errors were encountered: