-
Notifications
You must be signed in to change notification settings - Fork 917
pad results with whitespace - re #190 #230
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
Conversation
Unfortunately, it looks like this change does not work because it doesn't take into account multiple |
Actually that's not true: it does report proper line numbers, even with multiple style blocks. That said, the whole strategy feels a bit hacky, as though it should be handled with source maps or similar. Unfortunately that's outside my expertise. Any feedback would be appreciated. |
@@ -215,7 +215,8 @@ describe('vue-loader', function () { | |||
}), function (err) { | |||
expect(err).to.be.null | |||
getFile('test.output.css', function (data) { | |||
expect(data).to.contain('h1 {\n color: #f00;\n}\n\nh2 {\n color: green;\n}') | |||
console.log(data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove the log here?
Thanks for the comments - fixed. This PR has improved parse and lint errors for us, but I'm not convinced it's the most correct solution to the problem. For example: when source maps are enabled, chrome dev tools shows the padded, style-only file rather than the original |
Yeah, agreed. I'll merge this for now as a temporary workaround, and will see if we can get better sourcemap handling in the future. Thanks! |
Re: #190 – Padded the output to get line numbers accurate. Not sure if this is the correct strategy or not. Also did not test the effects on source maps.