Package Exports
- manifest-package-loader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (manifest-package-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
manifest-package-loader
This Webpack loader inserts data from package.json into a your manifest.json to ensure it's always up-to-date. (who remembers to update the version field every time?)
This is handy when writing chrome extensions. You may also be interested in the web-accessible resources plugin.
This script was inspired by SO user108471.
Install
yarn add -D manifest-package-loader
Usage
Add a rule to your webpack.config.json
:
// webpack.config.js
module.exports = {
...
module: {
rules: [
...
{
test: /^manifest\.json$/,
use: [
{
loader: 'file-loader',
options: { name: '[name].[ext]' }
},
'manifest-package-loader'
]
}
]
}
...
}
Now the following fields will be copied from webpack.json to your manifest.json:
- name
- description
- version
- author
- homepage_url
Contributing
Please file an issue on GitHub.
License
MIT, be free.