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

source map not building in --batch #61

Closed
danny007in opened this issue Feb 15, 2021 · 5 comments
Closed

source map not building in --batch #61

danny007in opened this issue Feb 15, 2021 · 5 comments

Comments

@danny007in
Copy link

danny007in commented Feb 15, 2021

Actually without --output

@danny007in
Copy link
Author

> cleancss -O1 --format breakWith=lf --source-map --source-map-inline-sources --with-rebase --batch --batch-suffix .min  "dist/css/*.css" "!dist/css/*.min.css"

ERROR: Source maps will not be built because you have not specified an output file.

@danny007in
Copy link
Author

but with --output --batch
--with-rebase not working
💯 that's the conflict

@jakubpawlowicz
Copy link
Collaborator

Thanks for reporting @danny007in - I'll have a closer look tomorrow.

@jakubpawlowicz
Copy link
Collaborator

Sorry it's not been addressed yet - I want to include the fix in 5.3 later this week so stay tuned.

jakubpawlowicz added a commit that referenced this issue Apr 8, 2021
Batch mode works without setting `--output` option and CLI wrongly assumed an
output is needed for source maps to work.
jakubpawlowicz added a commit that referenced this issue Apr 8, 2021
In such cases there `rebaseTo` option passed to `clean-css` is just the output
directory.
@jakubpawlowicz
Copy link
Collaborator

The version on main branch:

  1. doesn't show "ERROR: Source maps will not be built because you have not specified an output file." error and correctly builds source maps in batch mode
  2. fixes rebasing when --output is a directory

Hope this helps. I'm going to release it in 5.3 tomorrow.

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