Babel's modular runtime helpers that provide transpilation support for modern JavaScript features
94
Build a utility that loads Babel plugins and presets by name, demonstrating understanding of Babel's plugin resolution system.
Create a module that accepts plugin or preset names and loads them using Babel's configuration system. The module should:
The utility should work with:
@generates
/**
* Loads and validates Babel plugins and presets
*
* @param {Array<string>} names - Array of plugin/preset names to load
* @param {Object} options - Configuration options
* @param {string} options.type - Either 'plugin' or 'preset'
* @returns {Array<Object>} Array of results with { name, resolved, loaded, error }
*/
function loadBabelPlugins(names, options) {
// IMPLEMENTATION HERE
}
module.exports = { loadBabelPlugins };Provides the core Babel transformation and plugin loading functionality.
@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