meteor / react-packages

Meteor packages for a great React developer experience
http://guide.meteor.com/react.html
Other
572 stars 157 forks source link

Support dynamic loading #264

Closed alanning closed 4 years ago

alanning commented 5 years ago

Currently adding the 'react-template-helper' package will cause Meteor to send down React, ReactDom, etc. in the initial payload even if the React component in question is not loaded until later (via dynamic import).

Verified using the bundle-visualizer:

$ meteor --extra-packages bundle-visualizer --production

Adding {lazy: true} to package.js...

  api.addFiles(['react-template-helper.js'], 'client', {lazy: true});

...resolves this issue as explained here.

filipenevola commented 4 years ago

2.0.1 should fix this https://github.com/meteor/react-packages/blob/devel/packages/react-meteor-data/CHANGELOG.md

Fanaticys commented 4 years ago

@filipenevola This changes break app when you use ardatan:webpack package.

filipenevola commented 4 years ago

Hi @Fanaticys could you open a new issue?

Fanaticys commented 4 years ago

@filipenevola #293. Also I had created issue in ardatan:webpack atmosphere package (https://github.com/ardatan/meteor-webpack/issues/90) several months ago.