Episode 68: Vue ESM Support on CodePen with Chris Coyier and Stephen Shaw

Enjoy the Vue

We all love CodePen for its immediacy and were overjoyed when we heard the team had implemented a brand-new editor for Vue single-file components! Today Chris Coyier and Stephen Shaw from CodePen join us to talk about what it was like building this amazing feature into the platform. Our conversation begins with Chris giving a brief introduction to CodePen before getting into why he decided to start building it, and how it seemed like the logical next step to his CSS-Tricks blog. We talk about the many use cases of this hybrid between a code editor and a social network and each of us weighs in on how we like to use it in our development process. Of course, CodePen will become even more valuable to us now that it has a Vue editor and we take a deep dive with Chris and Steven into what it involved getting this feature off the ground. In our exploration, we come to see that the ease with which CodePen can demo projects on the fly requires a lot of work on the back end! Vue files can't be processed in the same ways as regular Pens and Stephen speaks to the challenge of getting the interface to support them so that the experience for the developer could be as close to plug and play as possible. So be sure to listen in today and try out the new Vue features on CodePen when you are done!

Key Points From This Episode:

  • Introducing Chris and Stephen and the work they do to maintain CodePen.
  • How CodePen works and the many uses it can be put to by developers.
  • The history behind why Chris started CodePen and how it has evolved over the years.
  • Why the CodePen team implemented an editor for Vue single-file components.
  • The hurdles of equipping CodePen to handle not just Vue but other editors too.
  • Challenges of outputting Vue files versus regular Pens and how they were solved.
  • How the method of safeguarding against circular dependency has evolved at CodePen.
  • Thoughts about the potential benefits of putting the script tag at the top of Vue Pens.
  • Perspectives on the different style guides for Vue versus React.
  • Where to find Chris and Steven online and learn more about what they do.


“I roped in some friends, and we built the first version of CodePen and the whole point was embedding. It wasn't the website itself, it was putting demos elsewhere.” — @chriscoyier [0:11:06]

“When I came in, I was more experienced with Vue, but coming into a React world, and I saw so much of the value of Vue and the way that single file components work, and that's very much a CodePen-y thing.” — @shshaw [0:14:11]

“A lot of this is like, how do we rearchitect CodePen in such a way that you can do things like that and not have it be such an embarrassing amount of technical debt that you'll freaking never do anything again.” — @chriscoyier [0:17:52]

How to Find Chris:

How to Find Stephen:

Links Mentioned in Today’s Episode:

Audio Player