Asset Files

Any files that you add to your Template sources will be copied over to the root of the build destination directory, so you can organize your email templates as needed.

Global assets

You may define a global email assets folder that will be copied to the build directory. The Starter sets it to the src/images directory:

config.js
export default {
build: {
static: {
source: ['src/images/**/*'],
destination: 'images',
}
}
}

Everything inside static.source will be copied to the static.destination directory, which is relative to build.output.path.

Multiple sources

You may define multiple asset source paths and all files from those paths will be copied to a single destination directory:

config.js
export default {
build: {
static: {
source: ['src/images/**/*', 'src/fonts/**/*'],
destination: 'assets'
}
}
}
Copyright © 2024 Maizzle SRLBrand policy
Edit this page on GitHub