orizens / ngx-infinite-scroll

Infinite Scroll Directive for Angular
https://www.npmjs.com/package/ngx-infinite-scroll
MIT License
1.25k stars 223 forks source link

Update roll up external and global for rxjs/operators to infer correct UMD module identifier #350

Closed frozenplanet14 closed 2 years ago

frozenplanet14 commented 4 years ago

Currently roll up is guessing the module id for rxjs/operator as rxjs_operators, while the rxjs exposes it as rxjs.operators. Is it possible to update the roll up config as below:

external: [ '@angular/core', '@angular/common', 'rxjs', 'rxjs/Observable', 'rxjs/Observer', 'rxjs/operators' ], globals: { '@angular/core': 'ng.core', '@angular/common': 'ng.common', rxjs: 'rxjs', 'rxjs/Observable': 'Rx', 'rxjs/Observer': 'Rx', 'rxjs/operators': 'rxjs.operators' }

Your issue may already be reported! Please search on the issue track before creating one.

Expected Behavior

Actual Behavior

Possible Solution

Steps To Reproduce / Demo (if applicable)

[ ] Please share a stackblitz or plunkr demo reproducing this issue

Context

Your Environment

orizens commented 4 years ago

version 9 has been released. @frozenplanet14 please update and close if not relevant anymore

frozenplanet14 commented 4 years ago

Rollup config is missing the rxjs operator from the list with the latest one as well. It is possible to update it as below? Please let me know if that is not possible, I will close this issue.

export default {
    entry: './dist/modules/ngx-infinite-scroll.es5.js',
    dest: './dist/bundles/ngx-infinite-scroll.umd.js',
    format: 'umd',
    exports: 'named',
    moduleName: 'ng.ngxInfiniteScroll',
    external: [
        '@angular/core',
        '@angular/common',
        'rxjs',
        'rxjs/Observable',
        'rxjs/Observer',
        'rxjs/operators'
    ],
    globals: {
        '@angular/core': 'ng.core',
        '@angular/common': 'ng.common',
        rxjs: 'rxjs',
        'rxjs/Observable': 'Rx',
        'rxjs/Observer': 'Rx',
        'rxjs/operators': 'rxjs.operators'
    },
    onwarn: () => { return }
}
orizens commented 4 years ago

@frozenplanet14 please feel free to open a pr and add that.

frozenplanet14 commented 4 years ago

Thanks @orizens! PR https://github.com/orizens/ngx-infinite-scroll/pull/357 has been submitted for review.