Export shared dependencies
Table of contents
There are 2 steps necessary to take advantage of radpack:
Our exports
We can export anything, but for the sake of this example we’ll keep it simple.
Example
Export shared dependencies
Building your application with radpack will not benefit you until you’ve exported something.
Example
In the above contrived rollup example, we’re exporting two entries, and rollup will take care of the rest. If you’ve not yet deployed anything, you have no need to register.
Deploy exported dependencies
Once you’re ready to deploy your exported dependencies, you can copy the dist
folder to wherever you host your assets. In this folder you’ll see radpack.json
and the bundled asset files in export1
and export2
folders. You can copy as-is, and overwrite any existing files. radpack.json
file is the only mutable file in dist
, so if you’re leveraging a CDN you may want to optimize accordingly. All *.js
files are immutable as their content hash will reside in their filename, and as a result can be cached for any length you desire.
Next
Let’s take a look at how building an application works.