1 | module.exports = ({ useHash, format }) => {
|
2 | let res
|
3 |
|
4 | if (format === 'iife') {
|
5 | res = {
|
6 | js: useHash ? 'assets/js/[name].[chunkhash:8].js' : 'assets/js/[name].js',
|
7 | css: useHash
|
8 | ? 'assets/css/[name].[chunkhash:8].css'
|
9 | : 'assets/css/[name].css',
|
10 | font: useHash
|
11 | ? 'assets/fonts/[path][name].[hash:8].[ext]'
|
12 | : 'assets/fonts/[path][name].[ext]',
|
13 | image: useHash
|
14 | ? 'assets/images/[path][name].[hash:8].[ext]'
|
15 | : 'assets/images/[path][name].[ext]'
|
16 | }
|
17 | } else {
|
18 | res = {
|
19 | js: '[name].js',
|
20 | css: '[name].css',
|
21 | font: '[path][name].[ext]',
|
22 | image: '[path][name].[ext]'
|
23 | }
|
24 | }
|
25 |
|
26 | return res
|
27 | }
|