-
Notifications
You must be signed in to change notification settings - Fork 14
/
.assetpack.js
50 lines (49 loc) · 1.51 KB
/
.assetpack.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { compressJpg, compressPng } from '@assetpack/plugin-compress';
import { audio, ffmpeg } from '@assetpack/plugin-ffmpeg';
import { json } from '@assetpack/plugin-json';
import { pixiManifest } from '@assetpack/plugin-manifest';
import { pixiTexturePacker } from '@assetpack/plugin-texture-packer';
import { webfont } from '@assetpack/plugin-webfont';
export default {
entry: './raw-assets',
output: './public/assets/',
cache: false,
plugins: {
webfont: webfont(),
compressJpg: compressJpg({
compression: {
quality: 80
}
}),
compressPng: compressPng(),
// audio: audio(),
ffmpeg: ffmpeg({
inputs: ['.mp3', '.ogg', '.wav'],
outputs: [
{
formats: ['.mp3'],
recompress: true, // mp3转mp3也压缩
options: {
// audioBitrate: 96,
// audioChannels: 1,
// audioFrequency: 48000,
}
},
]
}),
json: json(),
texture: pixiTexturePacker({
texturePacker: {
removeFileExtension: true,
},
// resolutionOptions: {
// resolutions: {
// default: 2, low: 1
// }
// }
}),
manifest: pixiManifest({
output: './public/assets/assets-manifest.json'
}),
},
};