BobManifestGenerator
BobManifestGenerator is a Webpack
plugin that helps you generate a manifest.json
file for your microservice, which can then be loaded via Bob.
Table of Contents
Prerequisites
In order to use BobManifestGenerator you need the following Prerequisites:
webpack
version 3
or highernode.js
version 8.12.0
or highernpm
version 6.4.1
or higher
How to use
In order to start using the plugin you should first install the package from npm
:
npm i -D @studyportals/bob-manifest-generator
After installing it you can import it to your webpack configuration file like so:
const BobManifestGenerator = require('@studyportals/bob-manifest-generator');
Subsequently you can add BobManifestGenerator to your webpack
plugins like so:
plugins: [
new BobManifestGenerator({
name: string,
html: string,
baseURL: string,
exclude: string[]
})
]
Options
When using the plugin, you can pass an options object to the constructor. This can include the following options:
Option | Description | Required |
---|
name | The name of your microservice. | yes |
html | The HTML that should be injected on the page the microservice is loaded in. | yes |
baseURL | The base URL for your microservice's assets. This will be prepended to the filenames. | no (default: '' ) |
exclude | An array of filenames to be excluded from the manifest. This can be just a filename or a filename including extension. | no (default: [] ) |