Load a W3C manifest file into the page
$ npm install w3c-manifest-loader --save-dev
Import the manifest.json file in your main file (probably where you import your css).
// using ES2015
import './manifest.json';
// or using CommonJS
require('./manifest.json');
And configure the loader for manifest.json
files in your webpack config file:
{
module: {
loaders: [
{
test: /manifest\.json$/,
loader: 'w3c-manifest?name=[name].[hash].[ext]&icon=icons/[name].[hash].[ext]&legacyAppleSupport=true'
}
]
}
}
These are common options you can specify in the require
or loaders
config.
name
- Name of the manifest.json output, defaults to[hash].[ext]
. See file-loader for more info.icon
- Name of the icons output, defaults to[hash].[ext]
. See file-loader for more info.legacyAppleSupport
Use the legacy proprietary Apple elements for WebApps.
This software is free to use under the MIT license. See the LICENSE-MIT file for license text and copyright information.