Skip to content

Commit

Permalink
added service worker for Prod
Browse files Browse the repository at this point in the history
  • Loading branch information
onyijne committed May 17, 2019
1 parent 23d6731 commit cee5f3b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions assets/AppAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@ class AppAsset extends AssetBundle
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
// 'css/site.css',
// 'assets/style.css'
];
public $js = [
'auto/app.js',
'auto/js/chunk-vendors.js'
'auto/app.js'
];
public $depends = [
];

public function init ()
{
parent::init();
if(!YII_ENV_DEV){
$this->js[] = 'auto/js/chunk-vendors.js';
$this->js[] = 'auto/service-worker.js';
}
}
}

0 comments on commit cee5f3b

Please sign in to comment.