File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
packages/nutui-taro-demo/config Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change
1
+ const { execSync } = require ( 'child_process' )
2
+
3
+ const UI = process . env . UI
4
+ console . log ( 'UI Review' , UI )
5
+
6
+ let hash = ''
7
+ try {
8
+ hash = execSync ( 'git rev-parse HEAD' ) . toString ( ) . trim ( ) . substring ( 0 , 7 )
9
+ console . log ( `当前 Git hash: ${ hash } ` )
10
+ } catch ( error ) {
11
+ /* empty */
12
+ }
13
+
1
14
module . exports = {
2
15
env : {
3
16
NODE_ENV : '"production"' ,
4
17
} ,
18
+ outputRoot : `dist/${ process . env . TARO_ENV === 'h5' ? `demo${ hash && UI ? `-${ hash } ` : '' } ` : process . env . TARO_ENV } ` ,
5
19
defineConstants : { } ,
6
20
mini : { } ,
7
21
h5 : {
8
- publicPath : ' /taro/react/3x/demo' ,
22
+ publicPath : ` /taro/react/3x/demo- ${ hash } ` ,
9
23
/**
10
24
* WebpackChain 插件配置
11
25
* @docs https://github.com/neutrinojs/webpack-chain
You can’t perform that action at this time.
0 commit comments