Registry / devops / af-webpack

af-webpack

JSON →
library1.14.9jsnpmunverified

Internal webpack configuration wrapper used by Ant Financial and UmiJS. Version 1.14.9 is the latest stable release, but active development has moved to the Utoopack bundler within UmiJS v4+. Originally designed to abstract webpack complexities, it is now effectively superseded by utoopack. Key differentiator: provides a unique, opinionated webpack interface tailored for Ant Financial's ecosystem.

npm install af-webpack
INSTALL
IMPORT
SIG · AF-WEBPACK
A
af-webpack
devopsjavascriptv1.14.9
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Config
import { Config } from 'af-webpack'
const { Config } = require('af-webpack')
ESM-only; not available as default export.
getUserConfig
import { getUserConfig } from 'af-webpack'
import getUserConfig from 'af-webpack'
Named export, not a default export.
getConfig
import { getConfig } from 'af-webpack'
Use this for programmatic access to the generated webpack config.

Demonstrates generating a webpack configuration object using af-webpack's getConfig function.

import { getConfig } from 'af-webpack'; const config = getConfig({ cwd: process.cwd(), entry: { app: './src/index.js', }, output: { path: './dist', filename: '[name].[hash].js', }, env: process.env.NODE_ENV || 'development', }); // config is a webpack configuration object console.log(config);
Debug
Known issues
deprecatedaf-webpack is deprecated in favor of utoopack. New projects should use UmiJS v4+ which bundles utoopack.
fix
Migrate to UmiJS v4+ and use utoopack or directly use webpack 5.
affects: >=1.0.0
breakingIncompatible with webpack 5 without modifications. af-webpack was designed for webpack 4 and may not work out-of-the-box with webpack 5.
fix
Use webpack 4 or manually adapt configurations for webpack 5 compatibility.
affects: >=1.0.0
gotchaConfiguration keys may differ from standard webpack. For example, `useHash` instead of `filename: '[hash]'`.
fix
Refer to af-webpack documentation for its unique configuration schema.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'af-webpack'
Package not installed or version mismatch.
fix
npm install af-webpack@1.14.9 --save-dev
TypeError: getConfig is not a function
Incorrect import (default instead of named).
fix
Use import { getConfig } from 'af-webpack' instead of import getConfig from 'af-webpack'.
Upgrade
Version history
1.14.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
38 hits · last 30 days
node
30
OpenAI (training)
1
Resources
af-webpack — npm install af-webpack · libregistry