es6-transpiler-config
raw JSON → 1.0.2 verified Fri May 01 auth: no javascript deprecated
A simplified utility for transpiling ES6+ JavaScript using webpack and Babel under the hood, aiming to reduce configuration overhead. Version 1.0.2 is the latest stable release, with no recent updates (last published years ago). It provides a single function `generateConfig` that returns a webpack configuration object for easy setup. Notable differentiators: it abstracts away webpack and Babel details, but requires manual Babel preset configuration in package.json. This package appears to be unmaintained and superseded by more modern bundlers.
Common errors
error Error: Cannot find module 'babel-preset-es2015' ↓
cause Missing required Babel preset dependency.
fix
npm install --save-dev babel-preset-es2015
error TypeError: generateConfig is not a function ↓
cause Incorrect import attempt (e.g., import instead of require).
fix
Use const generateConfig = require('es6-transpiler-config');
Warnings
deprecated This package is unmaintained; use a modern bundler like webpack 5 directly or Vite. ↓
fix Migrate to webpack 5 with babel-loader or use Vite.
breaking Requires Node >=6. May fail on older Node versions. ↓
fix Upgrade Node to version 6+.
gotcha Babel preset must be configured in package.json, not in webpack config, or the config function will not pick it up. ↓
fix Add 'babel': { 'presets': ['es2015'] } to package.json.
Install
npm install es6-transpiler-config yarn add es6-transpiler-config pnpm add es6-transpiler-config Imports
- generateConfig wrong
import generateConfig from 'es6-transpiler-config';correctconst generateConfig = require('es6-transpiler-config');
Quickstart
// Install: npm install --save-dev es6-transpiler-config webpack babel-core babel-preset-es2015
// package.json babel config:
// "babel": { "presets": ["es2015"] }
const generateConfig = require('es6-transpiler-config');
const path = require('path');
module.exports = generateConfig(
'./src/index.js',
'./dist/bundle.js'
);