weex-rax-framework

raw JSON →
0.6.5 verified Sat Apr 25 auth: no javascript maintenance

Rax framework integration for Weex, enabling React-like development for cross-platform native mobile apps. Current stable version is v0.6.5, but the project is in maintenance mode with no active development since 2020. It provides a bridge between Rax (Alibaba's React-like library) and Weex's native rendering engine, allowing developers to write components using Rax APIs and run them on Weex. Key differentiators include custom builtin modules via factory pattern and integration with weex-jsfm for native rendering. The latest releases (v1.x) are for the parent Rax project; this package is still at v0.6.5.

error Cannot find module 'weex-rax-framework/builtin'
cause The subpath 'builtin' is not defined in package.json exports or is missing.
fix
Verify the file exists in node_modules or use the correct subpath: 'weex-rax-framework/dist/builtin.js'
error Module not found: Error: Can't resolve 'rax'
cause Missing 'rax' npm package as a dependency.
fix
Run 'npm install rax' to add the required dependency.
error Uncaught TypeError: Rax.createElement is not a function
cause Incorrect import: importing 'weex-rax-framework' instead of 'rax'.
fix
Use 'import { createElement } from 'rax'' instead of from 'weex-rax-framework'.
deprecated weex-rax-framework is no longer actively maintained; use rax-weex instead.
fix Migrate to rax-weex package for continued support.
breaking v0.6.5 removes previously deprecated built-in module APIs without migration path.
fix Update custom builtin modules to use the factory pattern as described in the README.
gotcha Importing from 'weex-rax-framework' directly exports a single default export (the framework bundle), not individual Rax functions.
fix Use 'import Rax from 'weex-rax-framework'' and access Rax APIs via the 'rax' package separately.
npm install weex-rax-framework
yarn add weex-rax-framework
pnpm add weex-rax-framework

Shows how to configure webpack to build a weex-rax-framework bundle using RaxPlugin.

// Use webpack with RaxPlugin to build a framework bundle
const webpack = require('webpack');
const RaxPlugin = require('rax-webpack-plugin');

module.exports = {
  target: 'node',
  entry: {
    'rax.framework': './packages/weex-rax-framework/src/index.js',
  },
  output: {
    path: './packages/weex-rax-framework/dist/',
    filename: '[name].js',
  },
  plugins: [new RaxPlugin()],
  module: {
    loaders: [{
      test: /\.jsx?$/,
      exclude: /(node_modules|bower_components)/,
      loader: 'babel',
      query: { presets: ['es2015'] }
    }]
  }
};