Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

craco-plugin-standalone-single-spa

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

craco-plugin-standalone-single-spa

Craco plugin for running single-spa application standalone

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

craco-plugin-standalone-single-spa

Craco plugin to start single-spa application configured with craco-plugin-single-spa-application

Dependencies

This package depends on craco-plugin-single-spa-application and CRACO so be sure to configure it before trying to apply this.

Installation

npm install craco-plugin-standalone-single-spa --save-dev

or

yarn add -D craco-plugin-standalone-single-spa

Usage

  • Open the craco.config.js file and apply the following changes:
const SingleSpaAppcracoPlugin = require('craco-plugin-single-spa-application');
const StandaloneSingleSpaPlugin = require("craco-plugin-standalone-single-spa");

// This is configuration of craco-plugin-single-spa-application. See documentation of craco-plugin-single-spa-application package for more details.
const singleSpaAppPlugin = {
  plugin: SingleSpaAppcracoPlugin,
  options: {
    orgName: "my-org",
    projectName: "my-app",
  },
}

const singleSpaStandalonePlugin = {
  plugin: StandaloneSingleSpaPlugin,
  options: {
    appOrParcelName: "@my-org/my-app",
    disabled: false // defaults to process.env.NODE_ENV !== "development". if true plugin will not process code
  },
}

// Keep any other configuration you are exporting from CRACO and add the plugin to the plugins array
module.exports = {
  plugins: [
    singleSpaAppPlugin,
    singleSpaStandalonePlugin
  ]
}
  • Run yarn craco start to start development server on port 3000. Port may be changed by setting PORT environment variable.

License

Licensed under the MIT License, Copyright ©️ 2023 Yevhen Domnenko. See LICENSE for more information.

Keywords

standalone

FAQs

Package last updated on 12 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts