You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using comments like this {{~!~}} to trim away leading and trailing whitespace from component templates. Apparently this only works in development builds. It seems comments are stripped in production builds, and as a result our whitespace trimming syntax is gone as well.
This is not an issue for most components, but some are whitespace sensitive (for example, AuLink / AuLinkExternal) and this causes incorrect rendering in the production app.
I asked around in the Discord, but it seems it's not clear if this whitespace trimming comment should have been supported in the first place.
Some options:
trim the actual whitespace from the source code manually. This will result in templates that are less readable, but it would be the simplest solution (and we would need to use prettier ignore comments as well)
I'm inclined to go for option 1 for the components that need it and wait for something to be added to Ember itself (if ever). I'm not the biggest fan of adding a new build-time addon, since it might make the v2 addon conversion harder in the future.
We're using comments like this
{{~!~}}
to trim away leading and trailing whitespace from component templates. Apparently this only works in development builds. It seems comments are stripped in production builds, and as a result our whitespace trimming syntax is gone as well.This is not an issue for most components, but some are whitespace sensitive (for example, AuLink / AuLinkExternal) and this causes incorrect rendering in the production app.
I asked around in the Discord, but it seems it's not clear if this whitespace trimming comment should have been supported in the first place.
Some options:
<template>
tag emberjs/rfcs#982 which would also fix the problemI'm inclined to go for option 1 for the components that need it and wait for something to be added to Ember itself (if ever). I'm not the biggest fan of adding a new build-time addon, since it might make the v2 addon conversion harder in the future.
Background info on why we went for the current solution: ember-cli/ember-template-imports#201
The text was updated successfully, but these errors were encountered: