Skip to main content

metro-plugin-typescript

Build npm version

@rnx-kit/metro-plugin-typescript adds type checking to Metro.

Usage

 const { makeMetroConfig } = require("@rnx-kit/metro-config");
+const { TypeScriptPlugin } = require("@rnx-kit/metro-plugin-typescript");

module.exports = makeMetroConfig({
serializer: {
+ experimentalSerializerHook: TypeScriptPlugin(),
},
});

Options

KeyTypeDefaultDescription
throwOnErrorbooleanfalseWhether to throw when errors are found.