-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfis-conf.js
51 lines (43 loc) · 1.18 KB
/
fis-conf.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
51
/**
* @file FIS 配置
* @author
*/
// fis3-enable
fis.config.set('namespace', 'home');
// 按照 react-redux 的目录规范设置源代码目录
fis.match('/client/{actions,components,constants,routes,containers,page,reducers,store}/**.{js,es,jsx,ts,tsx}', {
parser: fis.plugin('typescript', {
module: 1,
target: 0
}),
isJsXLike: true,
isMod: true
});
// 启用npm管理前端组件
fis.enableNPM({
autoPack: true
});
fis.media('debug-prod').match('/client/**.js', {
packTo: '/client/pkg/aio.js'
}).match('/client/static/**.js', {
packTo: '/client/pkg/lib.js'
}).match('/client/**.css', {
packTo: '/client/pkg/aio.css'
});
// chrome下可以安装插件实现livereload功能
// https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei
fis.set('livereload.port', 35729);
fis.media('debug').match('*', {
optimizer: null,
useHash: false,
deploy: fis.plugin('http-push', {
receiver: 'http://127.0.0.1:8085/yog/upload',
to: '/'
})
});
fis.media('debug-prod').match('*', {
deploy: fis.plugin('http-push', {
receiver: 'http://127.0.0.1:8085/yog/upload',
to: '/'
})
});