A best-shot
preset for asset.
This preset offer the following features:
- bundle
jpg
/jpeg
/png
/gif
/svg
- bundle
woff
/woff2
/otf
/eot
/ttf
- image minify in production mode
npm install @best-shot/preset-asset --save-dev
// example: .best-shot/config.mjs
export const config = {
presets: ['asset']
};
Generate mutable resources filename:
import('./avatar/male.png?mutable');
// image/avatar/male.png
import('./header/header-bg.png');
// image/header-bg.min.xxxxxxxx.png
天地人-abc.jpg -> 4273f2f7-abc.jpg