Bundling and serving a multiple JS files / SDK with Netlify

answered
#1

Hello,
Is it possible to serve a JS bundle using netlify?
In essence I want to bundle a bunch of JS files, and serve to a client as an SDK. The client will be another web application (3rd party).

My thoughts are to use webpack to build the bundle and drop it in a public folder - but normally when deploying my SPA the index.html is served which pulls in the JS files, in this scenario I would have no html entry point.

Thanks!
Dennis

#2

Any help? Would love some thoughts on if this is possible!

#3

Sites won’t deploy without at least an empty index.html file.

But you can use redirects to serve your files.

Like:

/ /path-tojs-file.js   200

# or
/file.js /bundle-file-xyz.js   200
1 Like