Permalink
Browse files

Run flow on webpack build

  • Loading branch information...
lucapette committed Mar 12, 2017
1 parent 305cbdb commit 48773033b0992161115f3dda74346a135f5dd6e8
Showing with 14 additions and 5 deletions.
  1. +1 −0 package.json
  2. +8 −0 webpack.config.js
  3. +5 −5 yarn.lock
View
@@ -19,6 +19,7 @@
"extract-text-webpack-plugin": "^2.0.0",
"flow-bin": "^0.38.0",
"flow-typed": "^2.0.0",
+ "flowtype-loader": "^0.2.2",
"jest": "^19.0.2",
"react": "^15.4.2",
"react-dom": "^15.4.2",
View
@@ -1,6 +1,7 @@
const path = require("path");
const webpack = require("webpack");
+const FlowtypePlugin = require('flowtype-loader/plugin');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const config = {
@@ -12,6 +13,12 @@ const config = {
},
module: {
rules: [
+ {
+ test: /\.(js|jsx)$/,
+ loader: 'flowtype-loader',
+ enforce: 'pre',
+ exclude: /node_modules/
+ },
{
test: /\.(js|jsx)$/,
loader: 'babel-loader',
@@ -39,6 +46,7 @@ const config = {
'jQuery': 'jquery'
}),
new ExtractTextPlugin('styles.css'),
+ new FlowtypePlugin()
],
devServer: {
contentBase: path.join(__dirname, "public")
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 4877303

Please sign in to comment.