ember-cli-fastboot icon indicating copy to clipboard operation
ember-cli-fastboot copied to clipboard

Doesn't work when `ember-glimmer-remove-application-template-wrapper` flag is enabled.

Open cibernox opened this issue 7 years ago • 5 comments
trafficstars

Using Ember canary, if the feature flag ember-glimmer-remove-application-template-wrapper is enabled when the JS boots the SSR content is not replaced, ending on a repeated page:

screen shot 2018-01-12 at 21 12 40

cibernox avatar Jan 12 '18 20:01 cibernox

Awesome, thanks for reporting! The issue here is that this initializer can no longer clear the "prior boot"...

rwjblue avatar Jan 12 '18 20:01 rwjblue

We can change that to add another mechanism to track the boundaries. For example, if we rendered the user content like this:

<script type="x/boundary" id="fastboot-start"></script>

<!-- user rendered content goes here -->

<script type="x/boundary" id="fastboot-end"></script>

You could easily imagine implementing a bit of DOM traversal to remove all the "guts" between those markers....

rwjblue avatar Jan 12 '18 20:01 rwjblue

@rwjblue I can see how to modify the initializers to remove stuff between two known nodes, but any idea how to change the rendering to add those boundary markers?

cibernox avatar Jan 16 '18 23:01 cibernox

Ya it’s in fastboot package

rwjblue avatar Jan 17 '18 00:01 rwjblue

I believe #569 may have caused the shoebox data to be stripped from the page.

Reason being that if you look at the page source that was actually returned from Fastboot, it contains the shoebox data, where as viewing the page source in the 'Elements' tab of Chrome's dev tools, the shoebox content appears to have disappeared.

Has anyone else experienced this?

I assume the fix would be a simple case of updating the instance initializer to ignore script tags with a type of fastboot/shoebox?

EDIT: Also worth noting that this issue affects only ember-cli-fastboot v1.1.3+

mike183 avatar Oct 16 '18 19:10 mike183