Skip to content

2.0.0

Compare
Choose a tag to compare
@felipeplets felipeplets released this 11 May 16:58
· 7 commits to main since this release
4354662

2.0.0 (2022-05-11)

Version 2.0.0 is a major plugin release with new features and breaking changes.

Highlights

  • Added support to CRA5 / WebPack 5
  • Added new option outputFilename to rename the output file
  • Remove externals option

Migrating from 1.0.X to 2.0.0

Inside any project using Create React App (CRA) and CRACO, run:

npm install --save --save-exact craco-plugin-single-spa-application@2.0.0

or

yarn add --exact craco-plugin-single-spa-application@2.0.0

Please read the breaking changes section.

Breaking changes

The externals options has been removed so if you had anything set on the externals option from the plugin you now need to migrate it to use the default webpack externals option offered by CRACO.

Before:

singleSpaApplicationPlugin = require('craco-plugin-single-spa-application');

const singleSpaApplicationPlugin = {
  plugin: singleSpaApplicationPlugin,
  options: {
    orgName: "my-org",
    projectName: "my-app",
    externals: [{
        jquery: 'jQuery',
    }]
  },
}

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

After:

singleSpaApplicationPlugin = require('craco-plugin-single-spa-application');

const singleSpaApplicationPlugin = {
  plugin: singleSpaApplicationPlugin,
  options: {
    orgName: "my-org",
    projectName: "my-app"
  },
}

// Keep any other configuration you are exporting from CRACO and add the plugin to the plugins array
module.exports = {
    plugins: [singleSpaApplicationPlugin],
    webpack: {
        configure: {
            externals: [{
                jquery: 'jQuery',
            }]
        },
    }
}

Committers: 2