Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

StyleGuide 04-10 - Barrels #1301

Closed
Closed
@bodiddlie

Description

@bodiddlie

Since SystemJS doesn't use node module resolution, but angular2 (or rather the ts config we use) does, the barrel import syntax requires either changes to the imports, or adding entries in systemjs.config.js.

If you have an app/shared/index.ts folder and do import { SharedComponent } from '../shared'; somewhere, the default SystemJS setup from the tutorials will end up throwing a 404 because it tries to load ../shared.js.

If you change the import to be from '../shared/index, or add app/shared to the packageNames in systemjs.config.js, then it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions