It bears repeating that Charge uses React and JSX to generate static HTML on the server-side. It does not render the pages on the client-side in the browser. Charge is especially useful for building small websites where it wouldn’t make sense to serve React to the browser in order to render a simple page.
How your files are handled depends on what type of file it is. Most files will simply be copied from
Charge doesn’t really have this concept, or at least there isn’t any configuration around it. Every file is potentially a “bundle” and how files should be combined together is automatically inferred by figuring out what is a “dependency”.
If you have
dependency.js and they don’t reference each other in any way, then they will both be copied over and show up in the
target directory. But if
dependency.js is inferred to be a dependency, which means it will be treated differently in two ways:
dependency.jswill be bundled/included into
dependency.jswill not be copied over into the
This should probably be what you would expect to happen. It should fit your mental model of how build systems work. The only difference here is that other systems require you to explicitly configure what is an “entrypoint” and what is a dependency, whereas Charge analyzes the files to automatically figure this out for you.
Clean URLs are when the
.html extensions are dropped from URLs for aesthetic or functional reasons. The
.html extensions are now commonly considered superfluous. If you have a file named
/projects.html it’s now understood and generally preferred that the URL
domain.com/projects would serve that file.
Charge does not have a particular opinion about whether you use Clean URLs or not. The development server will serve the right files regardless of if you use URLs with
.html extensions or without.
However, it’s important to note that “clean URLs” is a deployment and/or hosting concern. That means when you build your site for deployment, Charge does not do anything to try and support clean URLs, because Charge can’t know where you plan to deploy the static site and how they might or might not handle clean URLs. It’s up to you to deploy your site using a service that supports the URL structure you want.
The section on Deployment also covers clean URLs to save you some time identifying the right place to host your site.