Home> PHP Framework> YII> body text

Why is yii2 installation so slow?

藏色散人
Release: 2020-04-05 10:41:47
Original
3077 people have browsed it

Why is yii2 installation so slow?

Why is the installation of yii2 so slow?

In fact, the installation of yii2 itself is very fast, mainly because it contains The js and front-end framework are relatively cumbersome. You can terminate the installation of the front-end js, which will not affect your use.

Modify fxp-asset to Asset Packagist

Refer to the official installation guide Yii advanced template installation mentioned:

It uses asset-packagist for managing bower and npm package dependencies through Composer. Also you can use asset-plugin, as in earlier versions, but it works slowly.
Copy after login

Find

"config": { "process-timeout": 1800, "fxp-asset":{ "installer-paths": { "npm-asset-library": "vendor/npm", "bower-asset-library": "vendor/bower" } } }, "replace": { "bower-asset/jquery": ">=1.11.0", "bower-asset/inputmask": ">=3.2.0", "bower-asset/punycode": ">=1.3.0", "bower-asset/yii2-pjax": ">=2.0.0" }
Copy after login

and modify it to

"config": { "process-timeout": 1800, "fxp-asset": { "enabled": false } }, "repositories": [ { "type": "composer", "url": "https://asset-packagist.org" } ]
Copy after login

Modify config/main.php

'aliases' => [ '@bower' => '@vendor/bower-asset', '@npm' => '@vendor/npm-asset', ],
Copy after login

Related tutorials Recommendation: yii framework

The above is the detailed content of Why is yii2 installation so slow?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!