Comments (3)
Since the standard is for the sources to be a relative path, the real fix is to pass a 'sourceMapBaseName' of the root part of the path which when stripped from the full path by the parser will create a relative path. In your case the correct param passed should be:
$options = array(
'sourceMap' => true,
'sourceMapWriteTo' => __DIR__ . '/theme.map',
'sourceMapURL' => '/less_php/theme.map',
'sourceMapBaseName' =>'/home/foo/public_html/',
);
The fix for my problem is to add the following lines to the Parser::AbsPath() function after the call to realpath()
$path = realpath($path);
if (!empty($path[1]) && $path[1] === ':') {
$path = substr($path,2);
}
from less.php.
I can confirm the 'sources' entries are bad. On windows servers it also includes the drive letter. HOWEVER, the correct entry should only be the relative path on the web server...so the example above a correct 'sources' entry would be 'less_php/theme.less'.
The full path is supposed to be trimmed in the Generator->normalizeFilename() function, HOWEVER the passed filename is TOO full so that the sourceMapBasepath can't be found/replaced by the strpos/substr calls.
from less.php.
@dleffler thank you for your reply, I hope that the maintainers will fix that soon
from less.php.
Related Issues (20)
- PHP 8.2 Creation of dynamic property warning HOT 2
- Tree_Javascript or Tree_JavaScript? HOT 6
- Allowed memory limit exceeded when unserializing cache. HOT 4
- Support `@property` rule (Less.js 3.x)
- Block comments in @font-face are moved to bottom of selector HOT 3
- Regression in v4.2.0 HOT 6
- Regression: CSS output differs from Less.js for mixin selector HOT 3
- Undefined array key "currentUri" in [...]Mapped.php Line 68 when using @import (inline) HOT 1
- Support each() function (Less.js 3.7.0) HOT 4
- Release v3.2.0 HOT 2
- PHP v5.6-7.0 deprecation HOT 1
- Cannot assign em or rem value to less variable. HOT 2
- Support @container queries (Less.js 4.2.0) HOT 1
- Import from google font HOT 3
- Deprecation warning in PHP 8.2 HOT 6
- if $cached_name is the same as the $compiled name, should not regenerate HOT 1
- Error in Compiling HOT 2
- @container queries support? HOT 2
- Support CSS4 space-separated syntax for rgba() function (Less.js 3.8.1) HOT 1
- Autoloading can fail due to incorrect class name casing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from less.php.