question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prevent `vue inspect` from outputting "omitted long function"

See original GitHub issue

What problem does this feature solve?

I’ve come to an issue where I need to modify the default vue CLI webpack configuration and while trying to output it I found out that key parts (mainly transformers) are omitted for no reason at all. This can be clearly seen on lines 30-32 of @vue/cli-service/lib/commands/inspect.js as the following is defined:

      if (typeof value === 'function' && value.toString().length > 100) {
        return `function () { /!* omitted long function *!/ }`
      }

What does the proposed API look like?

An additional modifier (for example -v for --verbose) would do.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
LinusBorgcommented, Apr 20, 2018

Well, if you’re fine with scrolling over hundreds of lines of code (in console or a file) from some function just to find some loader config, good for you. It would get on my nerves pretty quickly.

As I said, a --verbose flag is a nice idea, but the default should (in my opinion) the way it is.

0reactions
bhouse1273commented, Apr 21, 2018

Why not make the hard-coded 100 a config item? 0 for the equivalent of --verbose, 100 default. That would allow control of the allowable output function size, filtering out the really long functions, but still outputting the not-so-long ones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue CLI 3 - Is there a way to see HTMLWebpackPlugin's ...
When I run vue inspect it says that the templateParameters function was omitted long function . templateParameters: function () { /* omitted ......
Read more >
Tracking down performance pitfalls in Vue.js
vue , so my first thought is to check the reactive properties in the component as one could be causing the error. Reactive...
Read more >
Built-in Directives - Vue.js
The expression can be a method name, an inline statement, or omitted if there are modifiers present. When used on a normal element,...
Read more >
Render Functions & JSX | Vue.js
If you are new to the concept of virtual DOM and render functions, make sure to read ... 'hello') // props can be...
Read more >
Template Syntax | Vue.js
The v-bind directive instructs Vue to keep the element's id attribute in sync with the component's dynamicId property. If the bound value is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found