{"id":17787,"library":"macross-bundler","title":"Macross Bundler","description":"Macross Bundler is a set of managed Webpack configuration scripts designed to simplify the build process for web applications. It abstracts away complex Webpack setups, providing a streamlined command-line interface for common tasks like starting a development server and building for production. The current stable version is 0.1.24, indicating it's still in early development, and API changes can be expected. Its primary differentiator lies in providing a highly opinionated and managed configuration experience, similar to tools like Create React App but with custom extensions, notably including specific configurations for CDN prefixes and backend proxies, which may suggest an origin or strong influence from enterprise environments like Rakuten. It requires Node.js >= 16 and has peer dependencies on Webpack >= 5 and React >= 16.","status":"active","version":"0.1.24","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install macross-bundler","lang":"bash","label":"npm"},{"cmd":"yarn add macross-bundler","lang":"bash","label":"yarn"},{"cmd":"pnpm add macross-bundler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for applications built with Macross Bundler, reflecting its common use case for React-based projects.","package":"react","optional":false},{"reason":"Core bundling engine; Macross Bundler is a wrapper around Webpack configurations.","package":"webpack","optional":false}],"imports":[{"note":"Macross Bundler is primarily a command-line interface (CLI) tool. Its core functionality is invoked via `npx` or `package.json` scripts, not by direct programmatic JavaScript imports.","wrong":"import { start } from 'macross-bundler'; // Not an exposed JS API\nconst { build } = require('macross-bundler'); // Not an exposed JS API","symbol":"macross-bundler CLI commands","correct":"npx create-macross-app my-app\n# or use in package.json scripts:\n// \"start\": \"macross-bundler start\"\n// \"build\": \"macross-bundler build\""},{"note":"The configuration is defined in a local `macross.config.js` file which uses ESM `export default`. The bundler then consumes this file. It's not a symbol imported from the `macross-bundler` package itself, but rather a file that exports configuration *to* the bundler.","wrong":"import MacrossConfig from 'macross-bundler/config'; // Config is exported from your local file, not imported from the package\nconst config = require('./macross.config.js'); // Use 'import' for ESM config files.","symbol":"Macross Configuration Object","correct":"// macross.config.js\nexport default {\n  entries: { 'index': './src/index.js' },\n  publicDir: './templates',\n  // ... other config options\n};"},{"note":"If the library provides TypeScript type definitions for its configuration, developers can import the `MacrossConfig` type for type-checking their `macross.config.js` file. This is the most likely valid programmatic import.","wrong":"import { MacrossConfig } from 'macross-bundler'; // Use 'import type' for type-only imports.","symbol":"MacrossConfig (Type Definition)","correct":"import type { MacrossConfig } from 'macross-bundler';"}],"quickstart":{"code":"npx create-macross-app my-app\ncd my-app\nnpm install\n\n// macross.config.js (example configuration)\n// This file defines how your project is built.\nexport default {\n  entries: {\n    'index': './src/index.js',\n  },\n  publicDir: './templates',\n  outDir: '../resources/static',\n  templateOurDir: '../resources/templates',\n  cdnPrefixUrl: 'https://cdn.example.com', // Customize for your CDN\n  backendProxy: 'http://localhost:3000', // Proxy API requests in dev\n  devServerPort: 1234,\n};\n\nnpm run start\n// Open your browser to http://localhost:1234","lang":"typescript","description":"Demonstrates initializing a new project using `create-macross-app`, configuring `macross.config.js`, installing dependencies, and starting the development server."},"warnings":[{"fix":"Always pin to exact patch versions (`~0.1.x`) and thoroughly review release notes for each update. Be prepared for manual migration of configurations or scripts.","message":"As a 0.1.x version package, the API of `macross-bundler` is highly unstable and subject to frequent breaking changes without prior major version increments. Relying on specific internal behaviors or undocumented features is risky.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Ensure `macross.config.js` uses `export default`. If your project's `package.json` `type` is set to `commonjs`, or if you are in a legacy Node.js environment, you might need to rename the config file to `macross.config.mjs`.","message":"The `macross.config.js` file is expected to use ESM syntax (`export default`). Attempting to use CommonJS (`module.exports = {}`) will result in module resolution errors.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure your project explicitly installs compatible versions of `webpack` and `react`. Use `npm install webpack@^5 react@^16` to satisfy these requirements.","message":"Macross Bundler has strict peer dependencies on `webpack` (>= 5) and `react` (>= 16). Mismatched versions will lead to installation warnings or runtime errors during the build process.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Review all configuration options in `macross.config.js` carefully. Customize `cdnPrefixUrl`, `backendProxy`, and other environment-specific settings to match your project's infrastructure, or remove them if not needed.","message":"Configuration options like `cdnPrefixUrl` and `backendProxy` suggest an opinionated setup potentially tailored for specific enterprise environments (e.g., Rakuten). These might not be applicable or require careful customization for general-purpose projects.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-23T00:00:00.000Z","next_check":"2026-07-22T00:00:00.000Z","problems":[{"fix":"Ensure `macross-bundler` is installed as a `devDependency` (`npm install --save-dev macross-bundler`), and that your `package.json` scripts call `macross-bundler` directly or via `npx` (e.g., `\"start\": \"macross-bundler start\"`). Always run `npm install` after cloning a project.","cause":"The `macross-bundler` executable is not in the system's PATH or your `package.json` scripts are incorrectly configured, or `npm install` was not run.","error":"sh: macross-bundler: command not found"},{"fix":"Explicitly install the required peer dependencies: `npm install webpack@^5 react@^16`.","cause":"Despite being a peer dependency, `webpack` or `react` might not be directly installed in your project, or the installed version does not meet the `macross-bundler`'s requirements.","error":"Error: Cannot find module 'webpack' or 'react'"},{"fix":"Ensure your `macross.config.js` file uses `export default`. If your `package.json` does not have `\"type\": \"module\"`, consider renaming `macross.config.js` to `macross.config.mjs` to force ESM interpretation.","cause":"This typically occurs when Node.js is trying to interpret `macross.config.js` as a CommonJS module, but it uses ESM `export default` syntax.","error":"ERR_MODULE_NOT_FOUND in macross.config.js"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}