Registry / web-framework / rax-webpack-plugin

rax-webpack-plugin

JSON →
library0.6.6jsnpmunverified

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-plugin
INSTALL
IMPORT
SIG · RAX-WEBPACK-PLUGIN
R
rax-webpack-plugin
web-frameworkjavascriptv0.6.6
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.

RaxPlugin
const RaxPlugin = require('rax-webpack-plugin');
import RaxPlugin from 'rax-webpack-plugin';
Plugin does not ship ESM exports; CommonJS require() is required.
MultiplePlatform
const { MultiplePlatform } = require('rax-webpack-plugin');
import { MultiplePlatform } from 'rax-webpack-plugin';
MultiplePlatform is not exported as default; use destructured require().
BuiltinModules
const { BuiltinModules } = require('rax-webpack-plugin');
import BuiltinModules from 'rax-webpack-plugin';
BuiltinModules is a property of the plugin constructor, accessible via destructuring.

Minimal webpack configuration using rax-webpack-plugin with UMD target and external built-in modules.

const RaxPlugin = require('rax-webpack-plugin'); module.exports = { entry: './src/app.js', output: { filename: 'bundle.js', }, plugins: [ new RaxPlugin({ target: 'umd', moduleName: 'MyApp', globalName: 'MyApp', externalBuiltinModules: true, includePolyfills: false, }), ], };
Debug
Known issues
gotchaPlugin does not support ESM imports; must use CommonJS require().
fix
Use require('rax-webpack-plugin') instead of import.
affects: >=0.0.0
gotchaBuiltinModules is a static property on RaxPlugin, not exported as default.
fix
Access via RaxPlugin.BuiltinModules or destructure const { BuiltinModules } = require('rax-webpack-plugin').
affects: >=0.0.0
gotchaSpecifying both moduleName and globalName is required for UMD target; omitting causes runtime errors.
fix
Provide both options when target is 'umd'.
affects: >=0.0.0
breakingPeer dependency webpack ^1.x.x || ^2.x.x || ^3.x.x || ^4.x.x; webpack 5 not supported.
fix
Use webpack 4 or lower, or migrate to alternative plugin.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: RaxPlugin is not a constructor
Incorrect import: using default ES import on a CJS module.
fix
Use const RaxPlugin = require('rax-webpack-plugin');
Cannot find module 'rax-webpack-plugin'
Package not installed or missing peer dependencies.
fix
Run npm install --save-dev rax-webpack-plugin and ensure webpack is installed.
Module parse failed: Unexpected token (1:0) when building
Missing required options for RaxPlugin, e.g., target not specified.
fix
Instantiate RaxPlugin with valid options object, e.g., new RaxPlugin({ target: 'umd' }).
Upgrade
Version history
0.6.6latest on npm
Audit
Dependencies
webpackrequiredPeer dependency; plugin requires webpack to function.
Agent activity
10 hits · last 30 days
node
10
Resources
rax-webpack-plugin — npm install rax-webpack-plugin · libregistry