npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

monaco-commonjs

v0.0.0

Published

Monaco editor wrapped in commonjs and React

Readme

Monaco CommonJS

Disclaimer: everything in here is highly untested and very much a hack.

Instead of the annoying Monaco AMD loading, this module wraps the whole party in one CommonJS import without modifying any of the underlying source code.

This isn't published anywhere, but you can probably do the following to dev with it:

  • npm install
  • npm build
  • npm link
  • In your project: npm link react-monaco

Things to note:

  • Monaco is huge. The final dist here came out to 3.9MB. I would work to reduce this size, but then I'd probably have to touch the source code.
  • WebWorkers don't work. Let's not talk about it.
  • I couldn't figure out how to get around leaving monaco on the window. Maybe there is a clever way to inject it into the shimmed modules and keep it off the window, but I don't think I am clever enough to figure it out.
  • You'll need to serve up the extra disted SVG resource.
  • You'll need Python2 to build.

Why did you do this?

It felt like the best option for integrating the component. If we went ahead and used AMD for this stuff, but then built most of our code with CommonJS, that would be kind of wild. Why would we resolve some dependencies at build time and others at run time? That's just confusing.

Rewriting all of our code to be AMD also seemed really unfun. Things like Webpack and SystemJS are super hot and work around the CommonJS module style. I like those things more than I hate wrapping this module.

As an added bonus, using their module as AMD would not work with the current Workspace local setup and would lead to lots of CORS issues and rerouting to certain asset servers. You'd end up having to tweak their AMD loader anyway.

Why didn't you use Typescript?

I am lazy and had all the tooling set up for coffee. If you want the typings, you can probably require monaco-editor in as a dependency to your project and then pull in their typings as needed.

Why not modify the underlying source?

Cause then it would be really annoying to rebase if something new came along.

Why not build their Typescript source to CommonJS instead of shimming around AMD?

Tried it, didn't work nearly as well as I had hoped it would. Feel free to try it yourself.

Do you still support NLS and different languages?

Probably not.

Do you still support language extensions?

Probably, but if your extension requires a special worker that they would AMD load in, you'll have to add it yourself to the big module map. Otherwise, the hacked loader in here won't be able to find it.

I was loading CSS with their special loader and now it doesn't work!

Put it in your build yourself.