Migrating from 3.x to 4.x

Previously (before version 4.0.0) ScandiPWA used a single package for both Magento 2 module and ScandiPWA extension.

Not sure which extension version you have?

The following conditions indicate the belonging to an old version:
  • The presence of scandipwa/app folder
  • The presence of scandipwa.json file
To use this version with ScandiPWA version 4.0.0 and above, please use following instructions:
  1. 1.
    Clone the repository using the following command: git clone [email protected]:scandipwa/split-legacy-extension.git
  2. 2.
    Run the following command:node <path to cloned projject>/index.js <source path> [<destination path>]
  3. 3.
    Notice that in your <destination path> directory two new directories appeared: frontend and backend. These directories are npm and composer modules, correspondingly.
  4. 4.
    Validate the new modules. Things to verify:
    1. 1.
      All first-level children of the initial directory have found their path to the correct modules. E.g. if you have some .editorconfig in the root of your initial module, it will not be copied - the variety of files there can be endless and it is ambiguous where should they go. You are expected to handle that yourself. This tool only handles the files vital for the ScandiPWA plugin system.
    2. 2.
      Both composer.json and package.json files exist and are valid, with relevant information.
  5. 5.
    Enjoy the FE-only extension in your create-scandipwa-app setup and the BE-only module on your M2 instance!
  1. 1.
    Let's clone the tool into ~ – home directory: git clone [email protected]:scandipwa/split-legacy-extension.git ~/split-legacy-extension
  2. 2.
    Our extension is located in ~/Downloads/my-extension-v3 let's transform it, and save it into ~/Downloads/my-extension-v4:node ~/split-legacy-extension/index.js ~/Downloads/my-extension ~/Downloads/my-extension-v4
  3. 3.
    Now if we check the ~/Downloads/my-extension-v4 we should see the frontend and backend folders there!