A Vite plugin for your CoffeeScript projects
npm install -D vite-plugin-decaffeinate
import { defineConfig } from 'vite';
import decaffeinate from 'vite-plugin-decaffeinate';
export default defineConfig({
plugins: [
decaffeinate({
// the following are the default values
disableSuggestionComment: false,
disallowInvalidConstructors: false,
literate: false,
logicalAssignment: false,
loose: false,
looseComparisonNegation: false,
looseDefaultParams: false,
looseForExpressions: false,
looseForOf: false,
looseIncludes: false,
looseJSModules: false,
noArrayIncludes: false,
nullishCoalescing: false,
optionalChaining: false,
preferLet: false,
safeImportFunctionIdentifiers: [],
useCS2: false,
useJSModules: false,
})
]
});
Please refer to the Decaffeinate documentation for available options.
This work is licensed under The MIT License.