main-local.php
1.01 KB
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
<?php
$config['components']['request'] = [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '',
];
$config['bootstrap'][] = 'assetsAutoCompress';
$config['components']['assetsAutoCompress'] = [
'class' => 'app\ht\exts\AssetsAutoCompressComponent',
'debug' => true,
'enabled' => true,
'cssFileMerge' => true,//合并css文件
'srcDirs' => [
'@webroot/exts/base/1.0.0/unit/ui-base/fonts',
'@webroot/exts/base/1.0.0/unit/ui-base/i'
],
'jsFileMerge' => true,//合并js文件
'jsDirs' => [
'@webroot/exts/base/libs/plugins',
],
'cssFileCompress' => true,//压缩css文件
];
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
'allowedIPs' => ['*']
];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
];
return $config;