File provision

ScandiPWA introduces concept of "file provisioning". This is a feature of ScandiPWA extensions.

To provision a file - means to add a file into the "override" tool-chain with a lowest priority. This would make it discoverable by compiler, while any theme will be able to easily override it.

This is commonly used by extensions which implement changes in the entry-point. In example, @scandipwa/m2-theme provisions the pub/index.php path. It makes it possible to compile an application using this as an HTML entry-point without manually defining it in a theme.

To provision a file, set the scandipwa.provide field of package.json equal to an array, and populate it with desired path to provision.

Last updated