Comments (8)
Actually, I might have made a mistake when build into ES2015 module.
I've confirmed that the changes I made at https://github.com/sunshineo/angular2-infinite-scroll/commits/es2015 works for rollup. I don't need rollup-plugin-commonjs anymore.
However, now I cannot properly load it in my local dev env when using systemjs. Because the angular2-infinite-scroll.js fails to load. It looks very different now because it is es2015. Rollup is happen with it but systemjs is now not.
from ngx-infinite-scroll.
sound like it has something to do with rollup. not sure.
from ngx-infinite-scroll.
@orizens , the current project cannot be rolled up by their rollup-plugin-commonjs is probably their issue, I've filed issue with them at rollup/rollup-plugin-commonjs#87 . However how can we package this into a es2015 (es6) model? In that case, it will be rolled up directly by the rollup main project, and many other benefits I'm sure.
I tried to do this myself, but ended up with something unusable. https://github.com/sunshineo/angular2-infinite-scroll/commits/es2015 . I cannot install it when have
"angular2-infinite-scroll:"git+https://github.com/sunshineo/angular2-infinite-scroll#es2015"
in my package.json . I can't even import it correctly in my code.
from ngx-infinite-scroll.
this needs further investigation - what do you mean by package it to es6 model? is there other similar ng2 package that you're able to work with?
from ngx-infinite-scroll.
@orizens I'm no expert on JS standards. When I build my project to es2015 using typscript tsc, it can rollup (together with the angular2 core stuff) without the need of rollup-plugin-commonjs. Once I add some dependencies that are commonjs, for example I added angular2 material and this, I need to use the rollup-plugin-commonjs to rollup. And it worked with angular2 material but not this one.
from ngx-infinite-scroll.
this plugin isn't based on rollup and should work with tsc.
from ngx-infinite-scroll.
Hi @orizens . Rollup is not something you base on. https://github.com/rollup/rollup http://rollupjs.org/
Rollup is a next-generation JavaScript module bundler. Author your app or library using ES2015 modules, then efficiently bundle them up into a single file for use in browsers and Node.js – even if you use advanced features like bindings and cycles.
From what I can tell, this project is written in typescript and compiled into ES5 commonjs module according to configurations here https://github.com/orizens/angular2-infinite-scroll/blob/master/tsconfig.json
I wonder if it is possible to compile it into ES2015 module that meet ES2015 standard. So that rollup can bundler it.
I tried, but I did not figure it out.
from ngx-infinite-scroll.
Hello, everyone. For this particular problem, I solved it using a feature called "namedExport" feature of the rollup common js plugin
rollup/rollup-plugin-commonjs#87
from ngx-infinite-scroll.
Related Issues (20)
- Data is only visible after scrolling again on iOS
- Angular 14 HOT 1
- alwaysCallback is not working in version 13.0.0
- Missing target version for angular 6+ HOT 1
- how do you set the [horizontal] value based on the width of the parent?
- Support Angular@15
- Are you still maintaining this library? HOT 2
- Can ngx-infinite-scroll work with mat-select / mat-option HOT 1
- Shipping without @scarf/scarf HOT 1
- Angular v16 support HOT 3
- Facing issue in ngx-infinite-scroll version 16.0.0 HOT 2
- error NG6002: 'InfiniteScrollModule' does not appear to be an NgModule class. HOT 5
- Scroll events not fired when using Chrome devtools device mode
- Adding new standalone APIs HOT 1
- Scroll events not fired with angular 16 HOT 2
- Repeated events onScrollDown HOT 1
- Trigger event of no scrollbar is present HOT 2
- Upgrade to Angular 17 ? HOT 8
- After reloading the data, the scrolling event becomes invalid HOT 1
- List jumping when new items are loaded HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-infinite-scroll.