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.
# npm
npm install remove-flow-types-loader --save-dev
# yarn
yarn add remove-flow-types-loader --dev
module: {
rules: [{
test: /\.jsx?$/,
enforce: "pre",
use: ["remove-flow-types-loader"],
include: path.join(__dirname, "src")
}]
}
module: {
preLoaders: [{
test: /\.jsx?$/,
loader: "remove-flow-types",
include: path.join(__dirname, "src")
}]
}