cssOptions

  • property
steal-css.cssOptions {Object}  

Specifies configuration options that will be applied to steal-css.

Object

Properties

  1. timeout {Integer}Optional

    This specifies the time (in seconds) steal will try to load a css file, within a javascript module (e.g. require('./mycssfile.css'), in production mode.

    steal.config({
        cssOptions: {
            timeout: 15
        }
    });
    

    If no timeout is provided, the default value will be 60 seconds. Note:

    No javascript code will be execute until the CSS file is loaded. If the timeout is reached or loading the file will fail, StealJS terminates execution. The benefit of this behavior, you don't get unstyled content in production mode. For example, if you are using [steal-tools.guides.progressive_loading].

Help us improve StealJS by taking our community survey