question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Having lighter bundle alongside catching libraries in separated bundle file(s).

See original GitHub issue

After many searches and studying a lot of ReactJS starters, I find out this Starter is awesome and scalable. but I have some questions/sights about bundling.

I implemented a starter and when I run yarn build in my starter, these files are built:

  1. server.js: a bundled file just for the node in the server-side
  2. vendor.js: a vendor bundle that contains react, react-dom, redux, … and etc.
  3. client.js: a bundle file that contains just the application code.

Number One: in the react-cool-starter the ts-node read the server.tsx at the production moment and there isn’t a bundled file for running codes from the node server.

  • suggestion: It could be better we have a server-side bundle that contains the whole application, so it will be clean JavaScript and there is no need to have ts-node in server and it will be easier to have pm2 for large scale projects

Number Two: It could be awesome, that we have a bundle that contains the libraries which we used in our project, we could use service worker to cache until the next version, when we have the next version? _when we update or add/remove packages. Even we can split the vendor.js file to several files, but still, all of them should be cached until the next version. this way could help us to have a lighter bundle of application because the application continuously is changing but the vendor changes happen over time.

Number three: by describing number two, this part became obvious. now with the decoupled application codes from vendors, we have a very light application bundle. and it will be great. because when we develop new features the application bundles will update in client service worker but the vendors remain and user have a better experience in interacting with the website.

So, Dear @wellyshen, what’s your opinion about these concepts? Are you agreed, if yes I’m ready to make some critical changes to have these concepts in react-cool-starter.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
wellyshencommented, Jun 24, 2020

@amerllica Sorry for typo I mean the v5. Sure, go ahead for your idea. If you can give me a minimal POC, I can better to understand it.

1reaction
wellyshencommented, May 22, 2020

@amerllica We can keep it for features reference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Placing Content in a Bundle | Apple Developer Documentation
A bundle has a set of standard locations to hold content. The correct location to place content within a bundle depends on the...
Read more >
How to analyze your JavaScript bundles - YouTube
Learn how to analyze your bundled JavaScript code and to spot common issues that can easily bloat up your application size.
Read more >
Rollup & React- How to separate component bundles?
js and I am able to import those components but it is importing the whole library. Currently: File structure: src --components -----button ----- ......
Read more >
Analyze your React app's bundle size and reduce it using ...
As your React app gets larger, you may have to start worrying about its bundle size . An app's bundle size is the...
Read more >
Creating and sharing a CircuitPython library
If your making a library for the Adafruit Bundle the filename of ... sphinx_docs - Will the library have sphinx documentation files? y/n....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found