Open CRTX opened 9 years ago
@CRTX your suggestion does not work, because the filter instance can process many assets. Making the filter stateful is not an option (and it would totally break it)
@stof That's unfortunate. I also found out symlinking the directory with /tmp still doesn't work because there's more routes to the dart SDK the source map attempts to access which Symfony2 has no routes to. Here's a screenshot:
I wonder if this is more of a Symfony2 issue?
Source maps are an important debugging tool for developers.
Because the compiled file names are generated dynamically there's no way to know where a particular source map will be.
This is particularly a problem in frameworks like Symfony2 where the routes are also dynamic.
When a dart file is compiled into javascript you get a 404 error such as: `No route found for "GET /js/assetic_dartqJR8db.map"``
The work around for now is to symlink the public /js/ folder with /tmp/. However, this causes the /js/ developer folder to become cluttered with system and all types of temporary files.
On this following line:
https://github.com/kriswallsmith/assetic/blob/master/src/Assetic/Filter/DartFilter.php#L33
A simple modification of making the
$input
variable an internal class variable with a public getter would allow the developer to retrieve the temporary path of where the file is to be stored.Then it could be moved it or copied according to the developer's site environment via an external call to this class.
Any other suggestions are welcome to be able to work around this issue. Thanks.