Skip to content

Issue with webpack2 #3320

Closed
Closed
@gjuchault

Description

@gjuchault

OS?

macOs Sierra

Versions.

angular-cli: 1.0.0-beta.21
node: 7.1.0
os: darwin x64

I guess the bug comes from webpack2 that now understands import/export. I have a shared folder with a lot of services, and I import them inside my app.module.ts:

app/shared/logger/logger.ts:

export enum Level { OFF = 0, ERROR = 1, WARN = 2, INFO = 3, DEBUG = 4, LOG = 5 }

app/shared/logger/index.ts:

export * from './logger.service';
export * from './level';

app/shared/index.ts

export * from './logger';
// ... other services

app/app.module.ts:

import {
  // ... other services
  LoggerService,
  Level
} from './shared';

console.log(Level); // undefined

If I change the last line to console.log(Level, require('./shared').Level); they both get printed

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentneeds: investigationRequires some digging to determine if action is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions