Galaxy Framework
raw JSON → 4.0.32 verified Fri May 01 auth: no javascript
A utility framework with Rollup bundling and TypeScript support. Current stable version: 4.0.32. Frequent releases. Note: No README data available. Includes peer dependency on antd ^3.26.16, which may cause compatibility issues with newer versions.
Common errors
error TypeError: galaxy is not a function ↓
cause Using default import after version 4.0.0 where default export was removed.
fix
Use named import:
import { Galaxy } from 'galaxy-framework' error Module not found: Can't resolve 'antd' ↓
cause Missing peer dependency antd.
fix
Run:
npm install antd@3.26.16 Warnings
breaking In version 4.x, the default export was removed. Use named exports. ↓
fix Replace `import galaxy from 'galaxy-framework'` with `import { Galaxy } from 'galaxy-framework'`.
deprecated The `init()` method is deprecated. Use `run()` instead. ↓
fix Replace `app.init()` with `app.run()`.
gotcha Requires antd ^3.26.16. Using antd v4+ will cause runtime errors. ↓
fix Install antd@3.26.16: `npm install antd@3.26.16`
Install
npm install galaxy-framework yarn add galaxy-framework pnpm add galaxy-framework Imports
- Galaxy wrong
const Galaxy = require('galaxy-framework');correctimport { Galaxy } from 'galaxy-framework' - default wrong
const galaxy = require('galaxy-framework').default;correctimport galaxy from 'galaxy-framework' - types
import type { GalaxyConfig } from 'galaxy-framework'
Quickstart
import { Galaxy } from 'galaxy-framework';
const config = { antd: { theme: 'dark' } };
const app = new Galaxy(config);
app.run();