CodeIgniter Forums
Minifier - asset minification and versioning library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forumdisplay.php?fid=34)
+--- Thread: Minifier - asset minification and versioning library (/showthread.php?tid=75965)

Pages: 1 2


RE: Minifier - asset minification and versioning library - michalsn - 04-15-2020

Hmm... I think this is a bug related to the way CodeIgniter discover custom namespaces right now.

You have to place part:
PHP Code:
'Michalsn\Minifier' => APPPATH .'ThirdParty/minifier/src' 
  at the beginning of the $psr4 array in Autoload class. That should help for now. Or you can also change the location of the package away from App namespace (something else than app/ folder).


RE: Minifier - asset minification and versioning library - michalsn - 04-20-2020

Just an update on the issue with $psr4 array. This problem was fixed in the latest develop branch, so if you use the latest CodeIgniter version, then all should work just fine. If you have to stick with 4.0.2 for now, then the solution for you is one post above.


RE: Minifier - asset minification and versioning library - michalsn - 04-23-2020

I have just released v1.1.0 of this package.

The new release covers a few bugfixes and two new features:

- New config variable $returnType that specifies if we want to get html (default), json or php array as a result when we load a file to display.
- New optional config variables $baseJsUrl and $baseCssUrl to handle serving assets from separate domains.

Thank you for your feedback.


RE: Minifier - asset minification and versioning library - Inc33 - 06-27-2020

Would be cool if it would support html minification as well


RE: Minifier - asset minification and versioning library - ivantcholakov - 06-27-2020

Does it have an autoprefixer for CSS? Some older mobile devices need it.


RE: Minifier - asset minification and versioning library - michalsn - 06-29-2020

@Inc33 - html minification is out of the scope for this package
@ivantcholakov - no, only minification + combining and versioning is supported