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
Description
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
Labels
No labels