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
// app/templates/application.gts
import RouteTemplate from 'ember-route-template';
import Component from '@glimmer/component';
// Imports are not preserved
import { t } from 'ember-intl';
// Comments are preserved
// import { pageTitle } from 'ember-page-title';
interface Signature {
Args: {
model: string;
};
}
class ApplicationRoute extends Component<Signature> {
<template>{{t 'bar'}}</template>
}
export default RouteTemplate(ApplicationRoute);
The app explodes with:
application.ts:28 Uncaught ReferenceError: t is not defined
at Object.scope (application.ts:28:19)
at meta (index.js:584:32)
at compilable (index.js:1280:49)
at TemplateImpl.asLayout (index.js:1445:54)
at ConstantsImpl.component (index.js:130:617)
at eval (index.js:181:26)
at encodeOp (index.js:196:9)
at pushOp (index.js:1296:5)
at eval (index.js:1172:30)
at Compilers.compile (index.js:536:114)
When I look into the compiled application.ts file from dev tools:
I can put into the module scope anything I want (e.g: const foo = '123';) and it will be preserved in the compiled output. But any import statements get thrown away.
This on baffles me. Given following code:
The app explodes with:
When I look into the compiled
application.ts
file from dev tools:Imports are not preserved
and the line below (empty)Comments are preserved
and the line below (still comment, so it's preserved)The text was updated successfully, but these errors were encountered: