Skip to content

Barrels are not reaching into sub barrels #585

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnpapa opened this issue May 1, 2016 · 5 comments
Closed

Barrels are not reaching into sub barrels #585

johnpapa opened this issue May 1, 2016 · 5 comments
Assignees
Labels
effort2: medium (days) P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@johnpapa
Copy link
Contributor

johnpapa commented May 1, 2016

When generating a lot of shared items (see below) the root barrel in shared/index.ts is reaching into folders but not taking advantage of the child folder barrels.

For example I get this

export * from './entity.service';
export * from './exception.service';
export * from './init-caps.pipe';
export * from './message.service';
export * from './config';
export * from './toast'; // this is wrong ... should have been ./toast/toast.component
export * from './toast/toast.service';
export * from './spinner'; // this is wrong ... should have been ./spinner/spinner.component
export * from './spinner/spinner.service';
export * from './speaker.service';
export * from './speaker.model';
export * from './nav';
export * from './modal'; // this is wrong ... should have been ./modal/modal.component
export * from './modal/modal.service';
export * from './filter-text'; // this is wrong ... should have been ./filter-text/spinner.component
export * from './filter-text/filter-text.service';

And I expected this

export * from './entity.service';
export * from './exception.service';
export * from './init-caps.pipe';
export * from './message.service';
export * from './config';
export * from './toast';  // This gets /toast/index.ts barrel which gets both files
export * from './spinner'; // This gets /spinner/index.ts barrel which gets both files
export * from './speaker'; // This gets /speaker-services/index.ts barrel which gets both  files
export * from './nav';
export * from './modal'; // This gets /modal/index.ts barrel which gets both  files
export * from './filter-text'; // This gets /filter-text/index.ts barrel which gets both  files

cc @Brocco @hansl

@Brocco Brocco self-assigned this May 1, 2016
@filipesilva filipesilva added effort2: medium (days) command: generate P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Jun 4, 2016
@a5hik
Copy link

a5hik commented Aug 29, 2016

The same is the case with the WebPack build still. It successfully compiles.. but when I access the app at browser it throws the below error.

metadata_resolver.js:262Uncaught Unexpected value 'undefined' exported by the module 'XXXModule'

@a5hik
Copy link

a5hik commented Aug 29, 2016

The Suggestion here works..

#1831 (comment)

@shairez
Copy link
Contributor

shairez commented Sep 16, 2016

@hansl should be closed?

@Brocco
Copy link
Contributor

Brocco commented Sep 16, 2016

Yes, the idea of generating/maintaining barrels in the CLI has been deprecated.... closing.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort2: medium (days) P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

5 participants