Closed
Description
I'm building a small app that will need to act as a library for a client. They will need to pull a single JS and CSS file from me and then initialize my code using their own JS files. Therefore, I need to find a way to build my project into a single JS and a single CSS file. Is there a way to build with this in mind?
Example:
index.html
<script src="my_app.com/my_library_file.js></script>
<link rel="stylesheet" type="text/css" href="my_app.com/my_library_style.css"></link>
<div id="root"></div> <!-- will be used as React root when client initializes library -->
index.js
// after page loaded
my_library.init({
//options here
});
I am not worried about giving these files pleasant names, I am only concerned with building them into single files or automating the pulling of the other files of a build from my server.
Metadata
Metadata
Assignees
Labels
No labels