Gulp plugin for integrating the SWC (rust-based JavaScript/TypeScript compiler) into Gulp pipelines. Current stable version is 2.2.0 (released 2024-07-23), with a bus factor of less than 10 contributors and monthly releases. It provides fast transpilation via SWC, supports both CommonJS and ESM, and requires peer dependencies `@swc/core` (^1.7.20) and `gulp` (3.x, 4.x, or 5.x). Compared to gulp-babel or gulp-typescript, it offers significantly faster compilation and native TypeScript support without separate type checking. Node.js >=18 required.
npm install gulp-swcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates a basic Gulp task that compiles TypeScript files using SWC with a custom configuration for parser, target, minification, and module type.
Upgrade Node.js to >=18 or pin gulp-swc to v1.x.
Always pass an options object: swc({}).Order: .pipe(sourcemaps.init()).pipe(swc()).pipe(sourcemaps.write()).
Update @swc/core and adjust SWC options according to SWC changelog.
Always provide a static configuration object or call a synchronous function that returns an object.
Upgrade to Gulp v4 or v5.
Ensure gulp-swc runs in a Node.js environment (not bundled for browser). In tooling scripts, use CommonJS require with Node >=18.
Use const swc = require('gulp-swc'); or import swc from 'gulp-swc';Always pass an object: swc({...}) or at least swc({}).Reorder: .pipe(sourcemaps.init()).pipe(swc()).pipe(sourcemaps.write()).