Comments (5)
@aklkv I have come up with a minimal project demo to outline what I'm talking about if you would not mind checking it out.
The repo: https://github.com/LucasHillDex/engine-typescript
It has two branches.
In the 'main' branch: A simple ember addon, version 5.4. There is a single Typescript component called Header, which is used in the dummy application.hbs
The TypeScript is being compiled without ember-cli-typescript via the guide which is most importantly configured in the index.js of the addon. In this branch all is happy and the component is rendering.
In the branch 'engine' I have added ember-engines and the necessary configuration. Now, the app is no longer able to lookup the 'Header' component, mostly likely due to the TypeScript compilation no longer happening. I wonder if in the index.js
, the 'buildEngine' function is not passing the needed config to ember-cli-babel, but just a theory.
I think considering this is the supported way of using TypeScript in ember going forward that this is a real issue and something worth investigating.
Thank you!
from ember-engines.
@aklkv Thank you!! That was the issue.
from ember-engines.
@LucasHillDex could you please add a bit more details, on what exactly doesn't work?
from ember-engines.
@LucasHillDex could you please add a bit more details, on what exactly doesn't work?
@aklkv Yes, we have followed the migration guide for getting Typescript compiling in ember without ember-cli-typescript. https://guides.emberjs.com/release/typescript/application-development/converting-an-app/#toc_manually-enable-typescript-transpilation
This involves passing the above mentioned option to ember-cli-babel in the apps/addons build config. This migration has worked in all of our apps and addons except for the one using ember-engines. In that addon none of the typescript files can be found by the module loader at run time. My suspicion is this is due to the addon's index.js build file being different for an ember-engine, where the exported object extends an EngineAddon, perhaps the ember-cli-babel config is not being used or is overriden.
from ember-engines.
@LucasHillDex I have been able to run your repro with a small correction refer to engines section here
from ember-engines.
Related Issues (20)
- How to install an addon in an engine? HOT 2
- getOwner doesn't return the context for the route HOT 3
- cannot find module "@ember/routing/link-component" in ember ~4.1 HOT 3
- Class extends value [object Object] is not a constructor or null HOT 4
- Could not find module `@ember/legacy-built-in-components` HOT 2
- error reading "inaccessibleByURL" is undefined sometimes
- build error after upgrading to 0.9.0 HOT 3
- Service dependencies do not pass through properly in embedded engine (Ember 3.28) HOT 3
- Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'on') HOT 1
- dependencies do not pass through properly in embedded engine under single spa
- 0.8.22 breaks compatability with Ember > 3.24 HOT 2
- Transitioning from one engine route to another triggers a Cannot read properties of undefined (reading 'shouldSupersede')
- Rebuild crash on Ember 4.12.1 apps - Ember CSS file HOT 1
- Getting ember-source dependency conflict with ember-source 5.3 HOT 10
- Internal engine routing problems on Ember 5.x HOT 7
- Memory leak in tests when using setupEngine helper HOT 2
- Test teardown sequencing issue with the setupEngine helper. HOT 2
- How to write unit tests for utilities? HOT 2
- Provide a test helper that wraps render()? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-engines.