1.0.0 • Published 6 years ago

reason-types-webpack-plugin v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

reason-types-webpack-plugin

yarn add --dev reason-webpack-plugin

Installation

Add the plugin to your webpack config

// webpack.config.js
const ReasonTypesPlugin = require('reason-types-webpack-plugin')

module.exports = {
  // ...
  plugins: [
    new ReasonTypesPlugin({ sources: 'src' })
  ]
}

ReasonTypesPlugin will generate .js.flow files for you

// @flow

import { add } from './my_reason_file'

// The `add` function is typed!
const value = add(100, 200)