Skip to content

craigtaub/our-own-babel-sourcemap

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

Our own babel sourcemaps

Test application, contains a small JS code generation compiler. Transform small subset of JS AST into real code and produce the source map.

Transformation

Change:

function add(number) {
  return number + 1;
}

Into:

function add(number) {
  return 1 + number;
}

Usage

npm run compile

Compile src/index.es6.js into /build with updated file and source map.

npm run start

Compile and start simple express server loading JS assets.

Releases

No releases published

Packages

No packages published