An esbuild plugin for importing CoffeeScript and Literate CoffeeScript (.litcoffee) files, designed to integrate with Rails Sprockets. The current stable version is 2.2.2. The plugin compiles CoffeeScript to JavaScript using the coffeescript compiler, supporting options like source maps, bare mode, and Babel transpilation. It is actively maintained and provides TypeScript definitions. This plugin is a niche tool for legacy or existing CoffeeScript projects that want to use esbuild as their bundler, offering a straightforward API and compatibility with the Rails asset pipeline.
npm install esbuild-coffeescript-railsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using the plugin with esbuild to bundle a CoffeeScript entry point.
Use require('esbuild-coffeescript-rails') directly without .default.Avoid using `header: true`; set to false or omit.
Use separate plugins or preprocessors for JSX/TS before CoffeeScript compilation.
Set `inlineMap: true` in plugin options for better source map integration.
Upgrade Node.js to version 12 or higher.
Run `npm install --save-dev esbuild-coffeescript-rails` and ensure the import path is correct.
Use `require('esbuild-coffeescript-rails')` (CommonJS) or `import coffeeScriptPlugin from 'esbuild-coffeescript-rails'` (ESM).Ensure the entry point path is correct relative to build.js, and that the plugin is included in the plugins array.
No dependency data recorded yet.