phoenix-build

raw JSON →
4.0.3 verified Sat Apr 25 auth: no javascript

A collection of shared build libraries for Phoenix projects at Walmart Labs, version 4.0.3. It provides common build configurations and utilities for Node.js packages, designed for internal use in the Phoenix ecosystem. The release cadence is irregular, tied to project needs. Its key differentiator is tight integration with Walmart's internal tooling, but it lacks public documentation and widespread adoption due to its internal focus.

error SyntaxError: Cannot use import statement outside a module
cause Using ESM import in a CommonJS script without ESM support.
fix
Add "type": "module" to package.json or use .mjs extension for the script.
error TypeError: phoenixBuild is not a function
cause Calling default import as a function but expecting a named export.
fix
Use named import: import { build } from 'phoenix-build'.
breaking v4.0.0 migrated to ESM only; CJS require() will fail unless using dynamic import.
fix Use ES import syntax like 'import phoenixBuild from "phoenix-build"' or use dynamic import.
deprecated The 'minify' option has been deprecated in v3.2.0; use 'optimization.minimize' instead.
fix Pass { optimization: { minimize: true } } instead of { minify: true }.
gotcha Package is intended for internal Walmart use; it may lack community support and documentation.
fix Consider using well-known build tools like Webpack or Rollup for external projects.
gotcha Node.js engine requirement is >= 0.6, but the package may not work on Node.js < 12 due to ESM features.
fix Use Node.js >= 12 for v4.0.0+; for older versions, stick to v3.x series.
npm install phoenix-build
yarn add phoenix-build
pnpm add phoenix-build

Shows how to import and use the build function with basic options.

import { build } from 'phoenix-build';

async function runBuild() {
  try {
    const result = await build({
      entry: './src/index.js',
      output: './dist/bundle.js',
      minify: true,
      sourcemap: true
    });
    console.log('Build succeeded:', result);
  } catch (err) {
    console.error('Build failed:', err);
  }
}

runBuild();