glimmer-babel preset failing for typescript files
See original GitHub issuegiven:
import Component, { hbs } from '@glimmerx/component';
import HelloWorld from './components/HelloWorld.hbs';
export default class App extends Component {
static template = hbs`
<HelloWorld />
`
}
error:
once I’m console.log(HelloWorld)
, everything works just fine, looks like plugin should count .hbs
, .gbs
extensions
given:
import Component, { hbs } from '@glimmerx/component';
import HelloWorld from './components/HelloWorld.hbs';
console.log(HelloWorld);
export default class App extends Component {
static template = hbs`
<HelloWorld />
`
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Documentation - Using Babel with TypeScript
This technique is a hybrid approach, using Babel's preset-typescript to generate your JS files, and then using TypeScript to do type checking and...
Read more >babel/preset-typescript
This is so that we know that the import is not a type import, and should not be removed. allExtensions. boolean , defaults...
Read more >Upgrading from 1.x - ember-cli-typescript
Update ember-cli-typescript. Follow the detailed upgrade guide below to fix discrepancies between Babel and TypeScript's compiled output.
Read more >Code-Splitting - React
Most React apps will have their files “bundled” using tools like Webpack, ... For that you will need @babel/plugin-syntax-dynamic-import.
Read more >Prettier - Code formatter - Visual Studio Marketplace
JavaScript · TypeScript · Flow · JSX · JSON ... You can use VS Code settings, prettier configuration files, or an .editorconfig file....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I believe that the TS removing the imports also prevents template imports to work in ember with TS. So, fixing support for TS would be the best approach instead of not having TS support at all.
@knownasilya with latest TS compiler, new flag introduced, to not delete “not used” imports. It should help (but i’m did not tryied)