Is there a way to merge all JS build files in only one bundle?
See original GitHub issueHey guys, enjoying a lot my experience here with Gatsby, it’s really nice!
There is something I want to know, when I run gatsby build
, it generates a ton of files on public directory:
Is there a way to envolve all of this in a single bundle file?
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How do I bundle multiple javascript files into a single output file?
I have a folder containing 15 third-party js files (either jQuery plugins or javascript libaries) that I would like to bundle into a...
Read more >How to bundle mutiple JS and CSS files into single bundle
I want to bundle into one bundle home.bundle.js and it should ... Replace with gulp and gulp-concat if you need more than just...
Read more >How do you 'merge' several JS files into one? [closed]
Use a javascript bundler to combine many smaller scripts into a custom file per page. This is more complicated, but allows you to...
Read more >API - ESBuild
To join a set of files together with esbuild, import them all into a single entry point file and bundle just that one...
Read more >How to combine Javascript files in Magento 2 - Mirasvit
The simplest way to combine all your Javascript files is merging. This technique just concatenates all of them to the one large file....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No, this is by design to enable code splitting and other optimizations which make Gatsby so fast.
I’m using gatsby as a single page application generator, so I only have one page.
In this case, having one file (and one request) instead of 4-5 would be the more performant route. Shouldn’t be too hard to have an option/plugin that just appends the JS file and give this as an option.
cc @LekoArts