0.2.2 • Published 7 years ago

flowtype-loader v0.2.2

Weekly downloads
511
License
MIT
Repository
github
Last release
7 years ago

flowtype-loader

Flow loader for webpack

Install

$ npm install --save-dev flowtype-loader

OR, for lazy people like me:

$ npm i -D flowtype-loader

Usage

In your webpack configuration

var FlowtypePlugin = require('flowtype-loader/plugin');

module.exports = {
  // ...
  module: {
    preLoaders: [
      {test: /\.js$/, loader: "flowtype", exclude: /node_modules/}
    ]
  },
  plugins: [
    new FlowtypePlugin()
    // new FlowtypePlugin({cwd: '/path/'})
    // new FlowtypePlugin({failOnError: true})
  ]
  // ...
}