ember-cli-typescript: Export problems using typescript in an addon
Seems that modules defined in .ts files don’t get exported.
I have a reproduction example on this PR: https://github.com/cibernox/ember-native-dom-helpers/pull/16
The only changes in that PR, aside from installing the addon, is that I renamed /test-support/helpers.js -> /test-support/helpers.ts.
I see two unexpected things.
First of all, I see some disturbing error messages in the console that sound like errors but perhaps they are warnings because they don’t cause the build to fail:
The tests seems unable to resolve ember-native-dom-helpers/test-support/helpers. Inspecting /assets/test-support.js, there is no traces of define('ember-native-dom-helpers/test-support/helpers'), but the modules defined in .js files are there.
The simples way to reproduce is clone the repo linked above, checkout the migrate-to-typescript branch and run ember s
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (10 by maintainers)
After much chasing of ghosts I’ve managed to get to the bottom of this and it turns out that you can use
ember-cli-typescriptfrom an addon as is.Here is an example: https://github.com/vitch/addon-with-typescript
And an app which consumes that addon: https://github.com/vitch/app-with-typescript
The thing that made it work for me was moving
ember-cli-typescriptfromdevDependenciestodependencies…Awesome! Let’s fix it!