Skip to content

Npm build with angular redux lib problem #19

@galan83

Description

@galan83
  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • What is the current behavior?
    Any third party plugin I attempt to import has this issue.

After npm rub lib:build

[14:50:55] Starting '!build:webpack'... Starting compilation using the angular compiler. Angular compilation done, starting webpack bundling. Starting compilation using the angular compiler. Angular compilation done, starting webpack bundling. [14:51:04] Finished '!build:webpack' after 8.95 s [14:51:04] Starting '!build:rollup:fesm'... '@angular-redux/store/index' is imported by dist_package/@inntech/chart/src/chart/chart.component.js, but could not be resolved – treating it as an external dependency '@angular-redux/store/index' is imported by dist_package/@inntech/chart/src/periodicity-control/periodicity.component.js, but could not be resolved – treating it as an external dependency '@angular-redux/store/index' is imported by dist_package/@inntech/chart/src/frequency-control/frequency.component.js, but could not be resolved – treating it as an external dependency [14:51:04] Finished '!build:rollup:fesm' after 114 ms [14:51:04] Starting '!build:fesm:es5'... '@angular-redux/store/index' is imported by dist_package/@inntech/chart/src/chart/chart.component.js, but could not be resolved – treating it as an external dependency '@angular-redux/store/index' is imported by dist_package/@inntech/chart/src/periodicity-control/periodicity.component.js, but could not be resolved – treating it as an external dependency '@angular-redux/store/index' is imported by dist_package/@inntech/chart/src/frequency-control/frequency.component.js, but could not be resolved – treating it as an external dependency [14:51:04] Finished '!build:fesm:es5' after 88 ms [14:51:04] Starting '!build:rollup:umd'... '@angular-redux/store/index' is imported by dist_package/@inntech/chart/bundle/chart.es5.js, but could not be resolved – treating it as an external dependency No name was provided for external module '@angular-redux/store/index' in options.globals – guessing '_angularRedux_store_index'

In my components I import in this way:

import { select, NgRedux } from '@angular-redux/store';

If I check the resulting files after build like: chart.es5.js or chart.js they have changed my import to this one: import { NgRedux, select } from @angular-redux/store/index;
in UMD version do this: require('@angular-redux/store/index').

If I removed this index from that paths, the npm works properly.

  • What is the expected behavior?
    To be built without errors.

  • Please tell us about your environment:

  • Node version v8.6.0
  • Npm version: 5.3.0
  • Angular version: 4

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions