Git Product home page Git Product logo

Comments (5)

LucasHillDex avatar LucasHillDex commented on June 26, 2024 1

@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.
Screenshot 2024-02-12 at 4 09 01 PM

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.

LucasHillDex avatar LucasHillDex commented on June 26, 2024 1

@aklkv Thank you!! That was the issue.

from ember-engines.

aklkv avatar aklkv commented on June 26, 2024

@LucasHillDex could you please add a bit more details, on what exactly doesn't work?

from ember-engines.

LucasHillDex avatar LucasHillDex commented on June 26, 2024

@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.

aklkv avatar aklkv commented on June 26, 2024

@LucasHillDex I have been able to run your repro with a small correction refer to engines section here
Screenshot 2024-02-12 at 1 27 55 PM

from ember-engines.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.