Registry /
web-framework / web-app-manifest-loader
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ module.exports = require('web-app-manifest-loader')
✗ import webAppManifestLoader from 'web-app-manifest-loader'
This is a webpack loader, not imported in application code. Use in webpack config module.rules.
Webpack rule
✓ {
test: /manifest.json$/,
loader: 'file-loader?name=manifest.json!web-app-manifest-loader'
}
✗ {
test: /manifest.json$/,
use: 'web-app-manifest-loader'
}
Loader must be chained with file-loader; using alone won't output the manifest file.
require in app code
✓ require('./manifest.json')
✗ import manifest from './manifest.json'
Works with both, but require is traditional for webpack 1/2.
Shows webpack config chaining file-loader and web-app-manifest-loader, and application code requiring the manifest.
// webpack.config.js
module.exports = {
entry: './src/index.js',
output: { filename: 'bundle.js' },
module: {
rules: [
{
test: /\.json$/,
use: [
{
loader: 'file-loader',
options: { name: 'manifest.[ext]' }
},
{
loader: 'web-app-manifest-loader'
}
]
}
]
}
};
// manifest.json (in src/)
{
"name": "App",
"icons": [{
"src": "./icon-512.png",
"sizes": "512x512",
"type": "image/png"
}]
}
// src/index.js
const manifest = require('./manifest.json');
console.log(manifest); // resolved with webpack asset paths
Errors
Common errors & fixes
Module not found: Error: Can't resolve '/path/to/icon.png' in '...'
Image path in manifest not found relative to manifest file location.
fixUse relative paths starting with './' in manifest.json, e.g., './images/icon.png'.
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
Missing loader for JSON files or wrong chain order.
fixAdd web-app-manifest-loader and file-loader to webpack config as shown in quickstart.
Audit
Dependencies
file-loaderoptionalcommonly chained to output manifest file