Awesome
Remove Flow Types Webpack Loader
This plugin will remove Flow type annotations during
bundling using flow-remove-types
.
Options passed to this loader are passed through to flow-remove-types.
Install
# npm
npm install remove-flow-types-loader --save-dev
# yarn
yarn add remove-flow-types-loader --dev
Configure Webpack
Webpack 2
module: {
rules: [{
test: /\.jsx?$/,
enforce: "pre",
use: ["remove-flow-types-loader"],
include: path.join(__dirname, "src")
}]
}
Webpack 1
module: {
preLoaders: [{
test: /\.jsx?$/,
loader: "remove-flow-types",
include: path.join(__dirname, "src")
}]
}