Skip to content
 
 

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-codemod-example

When ES modules land in Node, it will be impossible to do this:

import {thing} from './common-js-module'

Because CommonJS is not statically analyzable. However many people (myself included) have been doing this for a long time:

import {readFile} from 'fs'

In this quick video, I show you a quick babel plugin I wrote to do a codemod on my code to fix this automatically.

About

An example of how to use babel as a codemod

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages