Starting with B2B Commerce 4.5, Optimizely focused the options for theme building and deployment on a central strategy that minimizes downtime and improves stability. The approach uses a build server to compile the theme's TS/SCSS files, then deploys only the resulting JS/CSS files to the web server. By building the themes ahead of time, sites start faster, have fewer moving parts, and rely less on the database.
How to Build Themes
For B2B Commerce Cloud, the build process is baked into Insite's CI process. The correct project structure is created automatically for themes that were initialized with createTheme.ps1.
If the build server does not find a package.json file for the theme, the build process will use the default package.json file with the associated TypeScript compiler and Grunt task runner.
Upgrading to 4.5.0 from Older Versions
B2B Commerce Cloud customers will automatically get the theme improvements in 4.5.0. Cloud customers only need to ensure that the theme compiles without errors so that the deployments execute cleanly.
Last updated: Dec 11, 2020