webcompiler

raw JSON →
7.0.1 verified Fri May 01 auth: no javascript deprecated

v7.0.1 (latest, Apr 2017) — Deprecated tool that wraps Babel, ESLint, Webpack, and SASS pipeline into a zero-config CLI. Pre-configured for ES6+JSX+Flow+SASS with built-in live reload, caching, and production minification/gzip. Last released 2017; no updates for 6+ years. Superseded by create-react-app, Vite, and modern webpack-based starters. Requires Node >=6.10.2.

error Error: Cannot find module 'webpack'
cause webcompiler expects webpack as a peer dependency; not installed automatically.
fix
npm install webpack@2 --save-dev (or the version corresponding to your webcompiler release)
error RULES_MISSING: 'no-invalid-this' rule not found
cause ESLint config references removed rules; webcompiler bundles an old ESLint preset.
fix
npm install eslint-plugin-import --save-dev or use webcompiler without linting (config lint: false)
error TypeError: webcompiler.compile is not a function
cause Importing as named export instead of default export.
fix
Use import webcompiler from 'webcompiler' (default) instead of import { compile } from 'webcompiler'.
deprecated Library is no longer maintained; use modern alternatives like Vite, webpack 5, or create-react-app.
fix Migrate to Vite or webpack 5 with appropriate loaders.
breaking v7 upgraded to Babel 6, breaking any config relying on Babel 5 APIs.
fix Update .babelrc to Babel 6 presets (e.g., babel-preset-env) instead of Babel 5.
gotcha React.PropTypes deprecated in favor of prop-types package; webcompiler v7.0.1 fixed this but older versions will break.
fix Update to >=7.0.1 or install prop-types and import explicit PropTypes.
deprecated Uses webpack 2 internally; tree shaking not fully functional until webpack 2.3 and react-hot-loader 3.
fix Upgrade to >=6.6.0 or use webpack 3+ with sideEffects flag.
gotcha Requires Watchman installed for watch mode and DevServer; not needed for one-off builds.
fix Install Watchman via package manager (brew install watchman on macOS) or skip watch features.
deprecated Flow integration relies on Flow <0.38; newer Flow versions break due to Interface file incompatibility.
fix Pin Flow to 0.38 or disable typecheck (webcompiler config typecheck: false).
npm install webcompiler
yarn add webcompiler
pnpm add webcompiler

Compile an ES6 module to a browser bundle using webcompiler's CLI or programmatic API with zero config.

// Install: npm i webcompiler --save-dev
// Create src/index.js:
const greet = (name) => `Hello, ${name}!`;
export default greet;
// Run CLI: npx webcompiler --entry src/index.js --output dist/bundle.js
// Or programmatically:
import webcompiler from 'webcompiler';
const result = webcompiler.compile({
  entry: './src/index.js',
  output: './dist/bundle.js',
  production: process.env.NODE_ENV === 'production'
});
result.then(() => console.log('Done')).catch(console.error);