12.1.0-alpha.0 • Published 3 years ago

react-storefront-edge v12.1.0-alpha.0

Weekly downloads
1,705
License
Apache-2.0
Repository
-
Last release
3 years ago

react-storefront-edge

Provides a react-storefront webpack build that produces oem.json.

Usage in react-storefront

Starting with react-storefront v6.73.0, developers can no longer use react-storefront's built in webpack edge build config. That has been replaced with a stub that instructs users to install react-storefront-edge. They can install react-storefront-edge@1.0.0 to keep the existing functionality.

Versioning

The version number of this library corresponds to the outer edge manager version emitted in oem.json. Only the major part of the number is included. So for example, in react-storefront-edge v4.0.1, version: '4' will be set in oem.json.

Design

This package is comprised of three main components:

webpack/index.js

Provides the webpack config for building the edge bundle. This is used in react-storefront apps by adding the following file to (app home)/config/webpack/webpack.prod.edge.js:

// config/webpack/webpack.prod.edge.js

const edge = require('react-storefront-edge/webpack')
const path = require('path')

module.exports = edge(path.join(__dirname, '..', '..'), {
  router: 'src/routes.js'
})

webpack/OEMConfigWriterPlugin.js

A webpack plugin that uses EdgeConfigFactory to derive oem.json from the provided router.

EdgeConfigFactory

Does all of the heavy lifting. Takes an instance of react-storefront/router/Router and emits oem.json.

Development

After cloning the repo run:

nvm use
yarn install && yarn run link

Then, to link to your react-storefront app, run the following in the root of the app:

npm run dev:link

Running Tests

yarn test

Publishing a new version

This package is published to npmjs.org. Each PR should update the version number according to the type of change made (major/minor/patch). Once all PRs are merged, edit and publish the release created by release-drafter in GitHub. A GitHub action will automatically publish the package to NPM.

12.1.0-alpha.0

3 years ago

11.1.0-alpha.0

3 years ago

12.0.0

4 years ago

11.0.0

4 years ago

10.0.0

4 years ago

9.0.0

4 years ago

8.0.0

4 years ago

7.0.0

4 years ago

6.0.0

4 years ago

5.0.0

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

3.0.1

4 years ago

4.0.0

4 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago

1.0.0-alpha.0

4 years ago