8000 pad results with whitespace - re #190 by indirectlylit · Pull Request #230 · vuejs/vue-loader · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 5 commits into from
May 25, 2016
Merged

Conversation

indirectlylit
Copy link

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.

@indirectlylit
Copy link
Author

Unfortunately, it looks like this change does not work because it doesn't take into account multiple style blocks. I'll look into that.

@indirectlylit
Copy link
Author

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);
Copy link
Member

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?

@indirectlylit
Copy link
Author

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 .vue file.

@yyx990803
Copy link
Member

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!

@yyx990803 yyx990803 merged commit abd0453 into vuejs:master May 25, 2016
indirectlylit added a commit to indirectlylit/kolibri that referenced this pull request May 25, 2016
@indirectlylit indirectlylit deleted the pad-css branch May 25, 2016 21:19
paulpflug added a commit to paulpflug/vue-loader that referenced this pull request May 26, 2016
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

Successfully merging this pull request may close these issues.

2 participants
0