The `fusion-cli` is the command-line interface for the Fusion.js framework, designed to orchestrate the development lifecycle of universal React applications. It handles compile-time configurations for both server and browser bundles, facilitating development, testing, and production deployments. Key features include a standardized Babel configuration with modern ECMAScript support, efficient hot module reloading, and an integrated web server. Fusion.js, originally developed by Uber, focuses on high performance, server-side rendering (SSR), and a modular, plugin-driven architecture, enabling seamless transitions between client and server logic. As of the provided npm data, the current version is 2.39.1. However, the last recorded release in the excerpt is from October 2022, and the broader Fusion.js project on GitHub shows minimal recent activity, suggesting a slow or halted development cadence for the framework. It emphasizes a strict, opinionated build process, notably not supporting custom Webpack configurations to maintain internal consistency and facilitate future bundler transitions.
npm install fusion-cliVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the core structure of a Fusion.js application using `fusion-cli`, showing app initialization, plugin registration, and a basic custom plugin.
Instead of custom Webpack configurations, leverage Fusion.js's plugin architecture and `.fusionrc.js` for build-time customizations. If a feature is truly missing, consider contributing to the Fusion.js project or creating a feature request.
Replace `--testFolder <path>` with `--testMatch '<glob-pattern>'` or `--testRegex '<regexp-string>'` in your `package.json` scripts or CLI commands.
Always use `yarn fusion build` or `npx fusion build` before `yarn fusion start` for production or staging environments. `yarn fusion dev` is for development with Hot Module Reloading.
Ensure your application and all Fusion.js-related plugins are compatible with React 18. Update `react` and `react-dom` peer dependencies accordingly. Review React 18 upgrade guides for potential breaking changes in your application code.
Rely on the CLI commands (e.g., `fusion dev`, `fusion build --production`) to set the appropriate `NODE_ENV`. If specific build behaviors depend on `NODE_ENV`, ensure they are configured within the `.fusionrc.js` or via plugin options that respond to the CLI-inferred environment.
Run `fusion <command>` where `<command>` is one of the available subcommands like `fusion dev`, `fusion build`, or `fusion start`. You can see all available commands with `fusion help`.
Verify that all required plugins are correctly registered using `app.register()` in your `src/main.js` or similar entry point. Inspect the stack trace to identify the problematic plugin and ensure its dependencies are satisfied. Check for proper initialization of values within the plugin's `provides` method.
Ensure your Node.js, Yarn, and npm versions meet the `engines` requirements. For Fusion.js projects, ensure you are using the correct Yarn version (historically Yarn v2/Berry) and have run `yarn install` at the monorepo root. Address any specific dependency installation errors.
This is a minor aesthetic issue and does not generally impact the build process or output. No direct fix for users, as it's an internal CLI behavior.