-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.config.assets.js
34 lines (31 loc) · 929 Bytes
/
.config.assets.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
const { dependencies } = require('./package')
function getNpmVersion (name, modules = dependencies) {
// 目前仅考虑^1.2.3 | ~1.2.3
return modules[name].replace(/[^~x]/, '')
}
let hostname = ''
switch (process.env.NODE_ENV) {
case 'production':
hostname = 'qiniu'
break
case 'test':
hostname = 'testqiniu'
break
case 'uat':
hostname = 'uatqiniu'
break
default:
hostname = 'testqiniu'
break
}
const privateAssets = {
css: [
// `https://${hostname}.shuhaisc.com/shsc-ui/${getNpmVersion('shsc-ui')}/index.css`,
// `https://${hostname}.shuhaisc.com/shsc-business-ui/${getNpmVersion('shsc-business-ui')}/index.css`
],
js: [
// `https://${hostname}.shuhaisc.com/shsc-ui/${getNpmVersion('shsc-ui')}/index.umd.min.js`,
// `https://${hostname}.shuhaisc.com/shsc-business-ui/${getNpmVersion('shsc-business-ui')}/index.umd.min.js`
]
}
module.exports = privateAssets