Babel's modular runtime helpers that provide transpilation support for modern JavaScript features
94
A command-line tool that inspects and reports on Babel configuration files in a project directory.
Load Babel configuration for a given file path and provide detailed information about the configuration source, options, and file paths.
Gracefully handle projects that have no Babel configuration files.
Extract and display the resolved configuration options that would be used for transpilation.
@generates
/**
* Inspects Babel configuration for a given file path.
*
* @param {string} projectDir - The root directory of the project to inspect.
* @param {string} filename - The target file path to check configuration for.
* @returns {Promise<Object|null>} Configuration information object or null if no config found.
* The returned object contains:
* - config: string|undefined - Path to the config file (babel.config.js, etc.)
* - babelrc: string|undefined - Path to the .babelrc file
* - ignore: string|undefined - Path to the .babelignore file
* - options: Object - Resolved Babel options including plugins and presets
* - hasFilesystemConfig: boolean - Whether configuration was loaded from the filesystem
*/
async function inspectConfig(projectDir, filename) {
// IMPLEMENTATION HERE
}
module.exports = {
inspectConfig
};Provides Babel configuration loading and inspection capabilities.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-babel--runtimedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10