react-loadable-ssr-addon
  • Introduction
  • Getting Started
    • Installation
    • Usage
    • Example
  • API Documentation
    • Webpack Plugin
    • Server Side
    • Assets Manifest
Powered by GitBook
On this page
  • Methods
  • getBundles

Was this helpful?

  1. API Documentation

Server Side

Methods

getBundles

Retrieve assets dependency list from given modules (chunks).

Parameter

Type

Descripti

manifest

object

Asserts manifest file content generated by react-lodable-ssr-addon

chunks

object[]

Chunk list to be loaded

Example

import { getBundles } from 'react-loadable-ssr-addon';

/**
 * getBundles
 * @param {object} manifest - The assets manifest content generate by ReactLoadableSSRAddon
 * @param {array} chunks - Chunk list to be loaded
 * @returns {array} - Assets list group by file type
 */
const bundles = getBundles(manifest, modules);


const styles = bundles.css || [];
const scripts = bundles.js || [];
const xml = bundles.xml || [];
const json = bundles.json || [];
...

PreviousWebpack PluginNextAssets Manifest

Last updated 5 years ago

Was this helpful?