Webpack plugin for the Rax framework, used to bundle Rax applications with support for multiple target formats (UMD, CMD, bundle, factory). Stable version 0.6.6, with later releases up to v1.2.x in the monorepo. Provides built-in module externalization, polyfill inclusion, and multi-platform output (web, weex, node, React Native). Differentiates from generic webpack plugins by offering Rax-specific features like framework comment injection and duplicate dependency checks. The package is part of the Alibaba Rax project and has a peer dependency on webpack 1–4.
npm install rax-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Minimal webpack configuration using rax-webpack-plugin with UMD target and external built-in modules.
Use require('rax-webpack-plugin') instead of import.Access via RaxPlugin.BuiltinModules or destructure const { BuiltinModules } = require('rax-webpack-plugin').Provide both options when target is 'umd'.
Use webpack 4 or lower, or migrate to alternative plugin.
Use const RaxPlugin = require('rax-webpack-plugin');Run npm install --save-dev rax-webpack-plugin and ensure webpack is installed.
Instantiate RaxPlugin with valid options object, e.g., new RaxPlugin({ target: 'umd' }).