-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Add map
option to PostCSS options.
#4980
Comments
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
I feel this is still an important feature request, as right now SASS and PostCSS sourcemaps cannot be used together through Hugo. The underlying PostCSS engine is already designed to support this usecase, so Hugo should only have to create a hook to allow it, as described in the OP. |
I think you are over-simplifying this. If this was simple, I would have already done it when I added this feature. |
@bep Do you have any specific information on what you would need? I'm not comfortable with submitting a patch in Golang, but I could try to work on some code that you could use as a starting point if you'd like. |
+1 for this feature. We at our web development department in LEGO A/S are currently rolling out a new framework for building websites, that uses HUGO to generate the pages. I'm trying to set up the best possible development environment for other frontend developers in our department. Therefore a better way than using inline source mapping would be awesome for debugging the SCSS structure directly from the browser. |
So, The current implementation reads from That said, For that to be of any value, So, the current way to do this is to be a little bit pragmatic during development:
So, before we start to spend time supporting a /cc @regisphilibert |
PostCSS + Pipes expert around here is @budparr |
Hmm, i guess that could be a solution as well, to use an environment variable. Since we don't really need to have source maps available on the live environment. I can hand this solution over to the team tomorrow, as i think it might be good enough for a proper development environment. Thanks for the quick reply btw 😃 On another note; I can also say we're looking forward for HUGO being able to support JSON directly instead of Markdown. It will make a lambda obsolete and make our whole pipeline much cleaner 👍 |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
There is currently a
no-map
setting allowed for PostCSS, which disables the inline sourcemaps. However there is no options for having external sourcemaps generated. Looking into the PostCSS docs and thepostcss-cli
code, it looks like a--map
option can be passed to the CLI to enable "separate-file" sourcemaps.CLI code docsI request that a "map" option is added along-side the "noMap" option that can already be passed into the PostCSS resource function.
The text was updated successfully, but these errors were encountered: