configurable-file-extensions: Shadowing addon files doesn't always work

Open
#240 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Domain
build-system

Research direction

Start by reproducing the intermittent app-file shadowing with the ember-intl and ember-feature-flags files described in the issue, including the branch that processes .ts files. Compare a normal build with a build after touching the missing file and inspect Chrome DevTools. Done means the compatibility-layer t helper and features service consistently override the addon files without requiring a rebuild trigger.

Written by the indexing model from the issue text.

Description

Cross-posting from #topic-typescript, so it doesn't get lost:

I noticed a peculiar problem with https://github.com/babel/ember-cli-babel/pull/140. I’m shadowing / clobbering files in the app directory provided by addons. For example, ember-intl re-exports the intl service and t helper in their app directory. I’m shadowing these with my own compatibility layer intl service and t helper. I’m doing the exact same thing to the features service of ember-feature-flags. This used to work reliably with ember-cli-babel 6.

But now it seems that sometimes this shadowing does not work and the addon-provided files “leak through”. I’m also unable to find my override file in the Chrome Dev Tools. Triggering a re-build on the “missing” file by touching it fixes the problem.

Does it maybe have something to do with parallelization?

Concretely what happened is that my t helper was sometimes missing and the ember-intl one leaked through. Same happened to the features service.

One side-note: I’m using my https://github.com/babel/ember-cli-babel/pull/236 branch to process .ts files.

This might be part of the cause.

Dominant language
JavaScript
Stars
152
Forks
115
Avg merge
23h 22m
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from emberjs/ember-cli-babel

All issues in emberjs/ember-cli-babel

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.