node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »



This package includes the Babel preset used by Modern Node. It includes:


After installing babel, you can install this package as a dependency:

npm install --save-dev babel-preset-node-module

And configure Babel to use it by editing .babelrc:

  "presets": ["node-module"]


  • targets - an object of browsers/environment versions to support.
  • browsers (array/string) - an query to select browsers (ex: last 2 versions, > 5%).

See babel-preset-env for details description of these options.

It defaults to current node version in development and test environment. For production babel-preset-latest is used.

  • loose (boolean) - Enable "loose" transformations
  • modules - Enable transformation of ES6 module syntax to another module type (Enabled by default to "commonjs").
    • Can be false to not transform modules, or one of ["amd", "umd", "systemjs", "commonjs"].
  • debug (boolean) - console.log out the targets and plugins being


  "presets": [
    ["node-module", {
      "targets": {
        "chrome": 52,
        "browsers": "last 2 safari versions"
      "loose": true,
      "modules": false