I'm trying to create npm module and I can't find single instruction on official babeljs website. How do you use babel-runtime package? From name I'm guessing it should be placed in "dependencies" section of package.json, right?
Absolutely no information here: https://github.com/babel/babel/tree/master/packages/babel-runtime
The runtime is optional, but like everything else in Babel 6, it is primarily enabled by adding a plugin. In this case, you need http://babeljs.io/docs/plugins/transform-runtime/
babel-runtimeis a package that contains a polyfill and many other things that Babel can reference. You'd install it in your app with
npm install babel-runtime
transform-runtimeis a Babel plugin to process your source code and inject
import foo from "babel-runtime"statements so that
babel-runtimeis actually used. You'd also install this with
npm install babel-plugin-transform-runtime.