Skip to content

distil/require-extension-hooks-babel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

require-extension-hooks-babel

Simple parser for vue files

Using require-extension-hooks you can transpile ES6/7/.. code to run in node. Although node supports 99.999% of ES6 features there is one major omission: export/import syntax.

Installation

npm install require-extension-hooks require-extension-hooks-babel --save-dev

Usage

const hooks = require('require-extension-hooks');
hooks('js').plugin('babel', {}).push();

// elsewhere...
import {foo} from './foo';

The second argument allows you to configure which options are passed into babel's transform function. By default this contains a node : current configuration to only use babel polyfills that node doesn't have.

About

Distil's fork that works with Babel 7

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%