Skip to content

Precompile url() with prefix #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brianlow opened this issue May 16, 2022 · 1 comment
Closed

Precompile url() with prefix #94

brianlow opened this issue May 16, 2022 · 1 comment

Comments

@brianlow
Copy link

brianlow commented May 16, 2022

I'd like

src: url("./fonts/icons.woff2");

to precompile to:

src: url("/myapp1/assets/fonts/icons.woff2");
          ^^^^^^^

We use a shared asset host so the full path includes the application name: assets.example.com/myapp1.

With webpacker we used the publicPath option to add the prefix. Is there an equivalent?

ASSET_HOST seems to assume a fully qualified url. We'd prefer to avoid host names (e.g. assets-staging.example.com) in our compiled assets so we can use the same docker image across environments.

@dhh
Copy link
Member

dhh commented Jan 21, 2024

This would be something for Sprockets or Propshaft to consider.

@dhh dhh closed this as completed Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants