fast-flow-transform-darwin-arm64

raw JSON →
0.0.3 verified Fri May 01 auth: no javascript

This is the native binary for the aarch64-apple-darwin platform for fast-flow-transform, a high-performance Flow stripping transform for JavaScript bundlers. Version 0.0.3 is current. The package is typically installed automatically as a dependency of the platform-agnostic fast-flow-transform package, but can be installed directly for edge cases. It provides native bindings for webpack, rspack, rsbuild, Parcel, Vite, Rollup, Rolldown, and esbuild adapters. Compared to alternatives like @babel/preset-flow or flow-remove-types, this package offers native performance via N-API and Hermes/FFT.

error Error: Cannot find module 'fast-flow-transform-darwin-arm64'
cause Attempting to import or require the platform-specific package directly without it being installed.
fix
Install 'fast-flow-transform' instead, which will automatically install the correct binary as an optional dependency.
error Module not found: Error: Can't resolve 'fast-flow-transform-darwin-arm64' in '/path/to/project'
cause Importing wrong package name in bundler configuration.
fix
Use 'fast-flow-transform' as the import source instead.
gotcha Do not install or import this package directly. It is automatically installed as an optional dependency of 'fast-flow-transform'. Importing it directly will fail on non-Darwin ARM64 platforms.
fix Install 'fast-flow-transform' instead and import from it.
gotcha The package is native-only and requires Node.js >=18. It will not work in browsers or older Node versions.
fix Ensure Node.js >=18 LTS is used.
npm install fast-flow-transform-darwin-arm64
yarn add fast-flow-transform-darwin-arm64
pnpm add fast-flow-transform-darwin-arm64

Shows how to use fast-flow-transform with webpack loader and esbuild plugin. Note that the platform-specific package is not imported directly.

import fastFlowTransform from 'fast-flow-transform';
import webpack from 'webpack';

const config = {
  module: {
    rules: [
      {
        test: /\.jsx?$/,
        use: {
          loader: 'fast-flow-transform/webpack',
          options: {
            // optional: specify file extensions
            extensions: ['.js', '.jsx']
          }
        }
      }
    ]
  }
};

// Or using the plugin for esbuild:
import { createFastFlowTransformPlugin } from 'fast-flow-transform';
import * as esbuild from 'esbuild';

await esbuild.build({
  entryPoints: ['src/index.js'],
  bundle: true,
  plugins: [createFastFlowTransformPlugin()]
});