magnars / optimus

A Ring middleware for frontend performance optimization.
364 stars 23 forks source link

Add :context-path option to assets #60

Closed cjohansen closed 6 years ago

cjohansen commented 6 years ago

Sometimes apps go into production not at the root of a server, but under some virtual directory/context path, e.g. http://example.com/my-app/

This commit introduces a :context-path option that can be added to assets. In the above example, adding :context-path "/my-app" to all assets saves you the hassle of actually creating said directory in resources/public and having to mention said directory name in build configurations etc.

:context-path also enables you to ignore the context path at development time, and easily change it in one place.

magnars commented 6 years ago

Thanks! 👍

magnars commented 6 years ago

[optimus "0.20.0"] released with this feature.