# @alicloud/console-os-loader

> Console OS Loader

Latest version **1.4.45** (published 2025-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @alicloud/console-os-loader
pnpm add @alicloud/console-os-loader
yarn add @alicloud/console-os-loader
bun add @alicloud/console-os-loader
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.45 |
| Published | 2025-07-28 |
| First published | 2019-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 42.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | jacksontian, fengmk2, pagecao, aliyunsdkteam, console-fe |

## Links

- npm: https://www.npmjs.com/package/@alicloud/console-os-loader
- npm.io page: https://npm.io/package/@alicloud/console-os-loader

## Dependencies (5)

- [uuid](https://npm.io/package/uuid.md) ^10.0.0
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [tslib](https://npm.io/package/tslib.md) ^2.4.0
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.24.1

## Recent versions

- 1.4.45 (latest) — 2025-07-28
- 1.4.45-alpha.1 (alpha) — 2025-04-23
- 1.4.30-alpha.0 (canary) — 2023-03-15
- 0.0.999-consoleBase (consoleBase) — 2023-02-15
- 1.0.1-next.0 (next) — 2021-02-08
- 1.4.45-alpha.0 — 2025-03-03
- 1.4.44 — 2025-02-18
- 1.4.43 — 2025-01-14
- 1.4.42 — 2024-08-22
- 1.4.41 — 2024-08-22
- 1.4.40 — 2024-08-22
- 1.4.39 — 2024-08-22
- 1.4.38 — 2024-08-22
- 1.4.37 — 2024-08-21
- 1.4.36 — 2024-07-15
- … 50 more at https://npm.io/package/@alicloud/console-os-loader/versions

## README

# Console OS Loader

An app bundle loader used by console os

## TODO

- [x] load single bundle
- [x] script load error handler
- [x] recursive load
- [x] load with deps
- [ ] combo load bundle

## How to use

```bash
tnpm i @alicloud/console-os-loader
```

```javascript
import { loadBundle } from '@alicloud/console-os-loader'

const vpc = await loadBundle({
  id: 'vpc',
  url: 'https://g.alicdn.com/aliyun-next/vpc/index.js'
})

```

## External library

``` javascript
import react from 'react'
import { loadBundle } from '@alicloud/console-os-loader'

const vpc = await loadBundle(
  {
    id: 'vpc',
    url: 'https://g.alicdn.com/aliyun-next/vpc/index.js'
    deps: {
      react,
    }
  }
)
```

## Build bundle

### Webpack

in you webpack.config.js

```javascript
const Chain = require('webpack-chain');
const merge = require('webpack-merge');
const { chainOsWebpack } = require('@alicloud/console-toolkit-plugin-os')

const chain = new Chain();
chainOsWebpack({ id: 'app-id' })(chain);
module.exports = merge(/*you webpack conf*/, chain.toConfig());
```

### Consol OS Toolkit
In OS, an app bundle is built by breezr, you can use @alicloud/console-toolkit-plugin-os to build your bundle

```javascript
/* breezr.config.js */

module.exports = {
  /*
   * other breezr config
   */
  plugins: [
    '@alicloud/console-toolkit-plugin-os'
  ]
}

```

---
_Source: https://npm.io/package/@alicloud/console-os-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
