AIOM+ (All In One Minify) is a ProcessWire module to easily improve the performance of your website. By a simple function call Stylesheets, LESS and Javascript files can be parsed, minimized and combined into one single file. This reduces the server requests, loading time and minimizes the traffic. In addition, the generated HTML source code can be minimized and all generated files can be loaded over a cookieless domain (domain sharding).
MIT License
33
stars
26
forks
source link
Relative @import in .less files not working in hosted environment #48
When feeding a less file to AIOM that includes an @import for another .less file in the same directory, less compilation fails, producing the following ending output in the generated css file:
#_____LESS_____ERROR_____REPORT_____ {content:"File `/site/templates/styles/phone.less` not found. in anonymous-file-0.less"}
The problem only occurs on the live server, which is a shared hosting environment with a virtual host, whilst my local environment does not employ a virtual host. The same live environment also suffers from bug #38
Both problems occur whenever DOCUMENT_ROOT (which is used by Minify_CSS_UriRewriter::rewrite) is different from wire('config')->paths->root (which always gives the accurate position of files).
@conclurer - Do you see any chance to review these and merge soon? I'd prefer not to have my fork linger around too long but to have these issues fixed in the main repository - there may be other people benefiting from those PRs as well...
When feeding a less file to AIOM that includes an
@import
for another .less file in the same directory, less compilation fails, producing the following ending output in the generated css file:The problem only occurs on the live server, which is a shared hosting environment with a virtual host, whilst my local environment does not employ a virtual host. The same live environment also suffers from bug #38
Both problems occur whenever
DOCUMENT_ROOT
(which is used byMinify_CSS_UriRewriter::rewrite
) is different fromwire('config')->paths->root
(which always gives the accurate position of files).Related issues:
I have now fixed and tested both issues locally and will send a PR shortly.