-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Auto-indent changes multiline strings #164
Comments
That's definitely a bug. Thanks for reporting it. I'm not sure how to best fix the general case of indented template strings, but we should make sure to have a CLI option, such as |
magic-string does allow you to pass an |
The auto-indent feature adds indentation to the contents of multiline strings.
$ rollup -f iife -n strings strings.js
A workaround would be to use the
indent: false
option, but as far as I can tell that's not possible with the CLI. Since the defaults areindent: true
, rollup is currently subtly breaking such code out of the box. A better solution would be to make the auto-indent feature treat these cases as an exception.I suggest that the output should be:
The text was updated successfully, but these errors were encountered: