skeeks-semenov / yii2-assets-auto-compress

Automatic compilation of js + css + html
https://skeeks.com/
BSD 3-Clause "New" or "Revised" License
157 stars 43 forks source link

yii2-assets-auto-compress not working; the compress css content is empty and js contains ;;;;;;;;;;;;; #11

Open aidonsnous opened 8 years ago

aidonsnous commented 8 years ago

my configuration is as follow:

'bootstrap'=>['assetsAutoCompress'], 'components' => [ 'assetsAutoCompress' => [ 'class'=>'skeeks\yii2\assetsAuto\AssetsAutoCompressComponent', 'enabled'=> true, 'jsCompress'=> true, 'cssFileCompile' => true, 'jsFileCompile' => true, ],]

I can see it is compiling all assets(jqueryAsset, YiiAsset, AppAsset,..) and bringing one js compressed file and one css compressed file. But the css compressed is empty(nothing inside) and the content of the js compressed file is : ;;;;;;;;;;;;;;;;;;;;;;;;; which is making even the call of $.() to prompt error in consolog:

(index):899 Uncaught ReferenceError: jQuery is not defined(anonymous function) @ (index):899

skeeks-semenov commented 8 years ago

Sorry, I never wrote about it. However, this tool only works on real sites. On the local projects is not working.

aidonsnous commented 8 years ago

@skeeks-semenov , Thanks for your quick assist; Mine is not local project; it is a real web site(uploaded on a vps server). May be I don't understand what you mean by "real site".

aidonsnous commented 8 years ago

Is there any solution?

skeeks-semenov commented 8 years ago

Can you tell the address of your site that are trying this solution?

aidonsnous commented 8 years ago

It is not yet accessible to public.

skeeks-semenov commented 8 years ago

That's the problem, this solution only works with public projects. Because it uses php file_get_contents function to retrieve the contents of css and js files that you have in fact closed.

msdksr commented 7 years ago

I am using it in real server, but it's not working. After using this it says "The view file does not exist". My site location is (http://bestinbd.com/projects/web/1705ADL/dev/)