mosaic
  • Overview
  • Integration
    • Next.js
    • Create React App
    • Webpack
  • Getting started
    • Extensions
    • Themes
  • Tutorials
    • Mosaic + React
    • Mosaic + Webpack
  • Install an extension
    • Install a local extension
    • Install with a package manager
    • Enable or disable an extension
  • Develop an extension
    • Anatomy of an extension
    • Namespaces
    • Runtime plugins
    • Build configuration plugins
  • CRA features
    • CRACO plugins
  • Next.js features
    • Styles
    • Pages
    • Common props
  • Architecture examples
    • Router
  • Themes
    • Parent theme system
    • File shadowing
  • Experimental
    • Module preferences
    • File provisioning
  • in-depth
    • How does it work?
Powered by GitBook
On this page

Was this helpful?

  1. Experimental

File provisioning

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

To provide 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 replace the web application's entry point. It makes it possible to compile an application using some other HTML entry-point without manually defining it in a theme.

To provide a file in some mosaic extension, set the mosaic.provide field of its package.json equal to an array, and populate it with desired path to provision.

package.json
{
    "mosaic": {
        "provide": ["public/index.html"]
    }
}

PreviousModule preferencesNextHow does it work?

Last updated 4 years ago

Was this helpful?