VS Code node:console Fix

By  on  

I've been using Microsoft's Visual Studio Code text editor for years with great success. The app has always been stable, flexible, and the best compliment I can give it: an afterthought. Recently, however, every time I added a console.log to a JavaScript file, VS Code would add import console from 'node:console'; to the top of file.

As you could imagine, that insertion would break the build and annoy the hell out of me. My colleague Brad Decker would come to the team's rescue with the following addition to our repository:

// jsconfig.json
{
  "exclude": ["node:console"]
}

With that jsconfig.json file, VS Code would no longer import a non-existent file that broke the build. Thank you to Brad for the bug fix and productivity boost!

Recent Features

Incredible Demos

  • By
    Image Reflections with CSS

    Image reflection is a great way to subtly spice up an image.  The first method of creating these reflections was baking them right into the images themselves.  Within the past few years, we've introduced JavaScript strategies and CANVAS alternatives to achieve image reflections without...

  • By
    MooTools Equal Heights Plugin:  Equalizer

    Keeping equal heights between elements within the same container can be hugely important for the sake of a pretty page. Unfortunately sometimes keeping columns the same height can't be done with CSS -- you need a little help from your JavaScript friends. Well...now you're...

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!