# craco-plugin-single-spa-app-aot

> Convert your CRA project into a single-spa application without ejecting or losing update support of react-scripts

Latest version **2.0.4** (published 2024-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install craco-plugin-single-spa-app-aot
pnpm add craco-plugin-single-spa-app-aot
yarn add craco-plugin-single-spa-app-aot
bun add craco-plugin-single-spa-app-aot
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2024-12-12 |
| First published | 2023-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | aot-technologies |
| Maintainers | shuhaib-aot |
| Keywords | single-spa, craco, cra4, cra5, cra, create-react-app |

## Links

- npm: https://www.npmjs.com/package/craco-plugin-single-spa-app-aot
- Repository: https://github.com/AOT-Technologies/craco-plugin-single-spa-application
- Homepage: https://github.com/AOT-Technologies/craco-plugin-single-spa-application#readme
- Issues: https://github.com/AOT-Technologies/craco-plugin-single-spa-application/issues
- npm.io page: https://npm.io/package/craco-plugin-single-spa-app-aot

## Dependencies (1)

- [systemjs-webpack-interop](https://npm.io/package/systemjs-webpack-interop.md) ^2.3.7

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 2.0.4 (latest) — 2024-12-12
- 2.0.3 — 2024-12-11
- 2.0.2 — 2023-07-18
- 2.0.1 — 2023-07-18

## README

# craco-plugin-single-spa-app-aot

Convert your CRA project into a single-spa application without ejecting and losing update support of react-scripts

![](https://img.shields.io/npm/v/craco-plugin-single-spa-application.svg?style=flat)
![](https://img.shields.io/npm/dt/craco-plugin-single-spa-application.svg?style=flat)

## Dependencies

This plugins depends on CRACO so make sure to follow the installation instructions before installing and setting up this plugin. https://github.com/gsoft-inc/craco/blob/master/packages/craco/README.md#installation

## Install

```
npm install craco-plugin-single-spa-app-aot --save-dev
```

## Usage

1. Open the `craco.config.js` file and apply the following changes:

```typescript
const SingleSpaAppcracoPlugin = require('craco-plugin-single-spa-app-aot');

const singleSpaAppPlugin = {
  plugin: SingleSpaAppcracoPlugin,
  options: {
    orgName: "my-org",
    projectName: "my-app",
    entry: "src/single-spa-index.tsx", //defaults to src/index.js,
    orgPackagesAsExternal: false, // defaults to false. marks packages that has @my-org prefix as external so they are not included in the bundle
    reactPackagesAsExternal: true, // defaults to true. marks react and react-dom as external so they are not included in the bundle
    minimize: false, // defaults to false, sets optimization.minimize value
    outputFilename: "single-spa-build.js" // defaults to the values set for the "orgName" and "projectName" properties, in this case "my-org-my-app.js"
  },
}

// Keep any other configuration you are exporting from CRACO and add the plugin to the plugins array
module.exports = {
    plugins: [singleSpaAppPlugin]
}
```

2. Run `npm run craco:build` to generate your microfrontend app bundle. The output will be located under build folder and named as `my-org-my-app.js` or using the name defined in `outputFilename` option.

---
_Source: https://npm.io/package/craco-plugin-single-spa-app-aot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
