F2 Manifest Loader
This package enables the automatic generation of app manifests using F2 and webpack
- Produces JS and JSON manifests
- Scripts and styles automatically have a cachebuster appended
Usage
loaders: // ... test: /\.jsx?/ loader: 'f2-manifest-loader' include: 'src/appclasses' options: dest: path filename: 'manifest' appclass: path styles: path commonScripts: 'http://my-cdn.com/bootstrap.js' commonStyles: 'http://my-cdn.com/nice-styles.css' inlineScripts: 'window.myObject = {hello: "world"}' html: '<my-app class="my-class"></my-app>'
Produces:
// dist/manifests/manifest.js
options
These options are available on top of the standard Webpack loader options:
dest
: String (required, default:null
) - path to destination folder for app manifestsfilename
: String - name of the generated manifest files. Default:<app_id>_manifest.js(on)
appclass
: String (required, default:dist/[name].js
) - path to the built appclassstyles
: [String] - array of app styles to be includedcommonScripts
: [String] - array of common scripts to be included before the appclasscommonStyles
: [String] - array of common styles to be included before app stylesinlineScripts
: [String] - array of inline scripts to be includedhtml
: String (default:<app-id />
lower-kebab-cased app id as declared in the appclass) - app HTML
Ignoring files
Include f2-manifest-loader-ignore
(case sensitive) in a comment in any source file to have that file ignored by the loader.
// f2-manifest-loader-ignore F2Apps'com_open_f2_ignored_app' = { thisappConfig = appConfig; thisappContent = appContent; thisroot = root; } { console; };