Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

flowcheck-loader

gaearon236MIT1.0.0

A Webpack loader for Flowcheck

flowcheck, flowtype, static, javascript, facebook, webpack

readme

flowcheck-loader

This is a Webpack loader for Flowcheck.

Flowcheck is a runtime assertions library that uses Flow syntax but is meant to be ran in development.

Chain this loader with jsx?stripTypes so types are stripped in JS code:

// Webpack config
module.exports = {
  ...
  module: {
    loaders: [
      { test: /\.jsx?$/, loaders: ['jsx?harmony&stripTypes', 'flowcheck'], exclude: /node_modules/ }
    ]
  }
};

You can use this with or without using Flow or TypeScript itself.
It can also be a nice first step towards migrating code to Flow.

Read more about Flowcheck