dojo dragon main logo

Static assets

Many assets like CSS and images will be imported by modules and inlined automatically by the build process. However, sometimes it is necessary to serve static assets like the favicon or video files.

Static assets can be added to an assets/ directory at the project root. At build time, these assets are copied to an assets/ directory along-side the built application.

The build also parses src/index.html for CSS, JavaScript, and image assets, hashes them and includes them in the output directory. A favicon can be added to src and referenced by src/index.html. The build will then hash the file and copy it to the output directory with a file name of favicon.[hash].ico.

Example favicon

cp /path/to/favicon.ico ./assets/
<link rel="shortcut icon" href="/assets/favicon.ico">

Note the use of an absolute URI (starting with /) in the reference.