hearsayit / HearsayRequireJSBundle

RequireJS integration for Symfony2.
130 stars 55 forks source link

Addressed issue #44 regarding dev env 404 errors #53

Closed komputerwiz closed 9 months ago

komputerwiz commented 10 years ago

[ConfigurationBuilder] Use Request#getBasePath() if desired target file exists, but fall back to Request#getBaseUrl() otherwise; that is, if the script needs to be generated by Assetic's controller.

If assetic.use_controller was enabled, ConfigurationBuilder unconditionally prepended the front controller script (i.e. app_dev.php/) to the base URL. This led to 404 errors when attempting to load, for example, /base/path/app_dev.php/path/to/file.js in a require() call. Scripts that are generated by Assetic need this behavior, but scripts that already exist in the web directory should be loaded directly without going through the Assetic controller.

ihortymoshenko commented 10 years ago

@komputerwiz, I don't see the point in these changes. If you don't want to use the controller, switch off this option in your application configuration and make dump assets. In production URLs are correct.