Skip to content
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

Support inline source maps in Sprockets #228

Open
Mr0grog opened this issue Oct 11, 2024 · 0 comments
Open

Support inline source maps in Sprockets #228

Mr0grog opened this issue Oct 11, 2024 · 0 comments
Assignees

Comments

@Mr0grog
Copy link

Mr0grog commented Oct 11, 2024

This is somewhat related to #127, but a little different/simpler.

Autoprefixer-rails can currently read in an inline sourcemap and update it if you set the map: true option when calling it directly:

result = AutoprefixerRails.process(source_css, map: true, from: 'in.css', to: 'out.css')

…but if you’re using the Sprockets integration, it doesn’t seem like there is any way to set it:

def self.run(filename, css)
output = filename.chomp(File.extname(filename)) + ".css"
result = @processor.process(css, from: filename, to: output)

I think it would be really helpful if the Sprockets integration looked for an inline source map in the source CSS string and, if present, automatically set map: true when running the processor.

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