All Projects → usmanyunusov → webpack-webmanifest-loader

usmanyunusov / webpack-webmanifest-loader

Licence: MIT license
Minimalistic webpack loader to generate webmanifest file (and process icons URLs).

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to webpack-webmanifest-loader

Css Modules Typescript Loader
Webpack loader to create TypeScript declarations for CSS Modules
Stars: ✭ 172 (+975%)
Mutual labels:  webpack-loader
Vue Template Loader
Vue.js 2.0 template loader for webpack
Stars: ✭ 253 (+1481.25%)
Mutual labels:  webpack-loader
webpack-demos
webpack小练习
Stars: ✭ 17 (+6.25%)
Mutual labels:  webpack-loader
Angular Router Loader
A Webpack loader that enables string-based module loading with the Angular Router
Stars: ✭ 194 (+1112.5%)
Mutual labels:  webpack-loader
Frontmatter Markdown Loader
📝 Webpack Loader for: FrontMatter (.md) -> HTML + Attributes (+ React/Vue Component)
Stars: ✭ 228 (+1325%)
Mutual labels:  webpack-loader
gzip-loader
[DEPRECATED] gzip loader module for webpack
Stars: ✭ 15 (-6.25%)
Mutual labels:  webpack-loader
Pug As Jsx Loader
Stars: ✭ 168 (+950%)
Mutual labels:  webpack-loader
angular-hmr-loader
🔥 Angular HMR Webpack Loader by @AngularClass
Stars: ✭ 32 (+100%)
Mutual labels:  webpack-loader
One Loader
Single-file components for React
Stars: ✭ 233 (+1356.25%)
Mutual labels:  webpack-loader
vue-hot-reload-loader
Enable hot module replacement (HMR) on your Vue components
Stars: ✭ 20 (+25%)
Mutual labels:  webpack-loader
String Replace Loader
Replace loader for Webpack
Stars: ✭ 205 (+1181.25%)
Mutual labels:  webpack-loader
Svg Url Loader
A webpack loader which loads SVG file as utf-8 encoded DataUrl string.
Stars: ✭ 217 (+1256.25%)
Mutual labels:  webpack-loader
jsx-compress-loader
⚛️JSX optimisation loader to reduce size of React application
Stars: ✭ 40 (+150%)
Mutual labels:  webpack-loader
Polymer Webpack Loader
WebPack Loader for Polymer Web Components
Stars: ✭ 192 (+1100%)
Mutual labels:  webpack-loader
fengari-loader
Webpack loader for fengari
Stars: ✭ 27 (+68.75%)
Mutual labels:  webpack-loader
Workerize Loader
🏗️ Automatically move a module into a Web Worker (Webpack loader)
Stars: ✭ 2,135 (+13243.75%)
Mutual labels:  webpack-loader
sizeof-loader
Webpack loader that works like url-loader (or file-loader) but with extracted information such as image dimensions and file-size.
Stars: ✭ 20 (+25%)
Mutual labels:  webpack-loader
lodash-loader
Cherry-picks Lodash functions and require them explicitly to reduce the webpack bundle size.
Stars: ✭ 13 (-18.75%)
Mutual labels:  webpack-loader
css-raw-loader
🌁 CSS Raw loader module for Webpack
Stars: ✭ 13 (-18.75%)
Mutual labels:  webpack-loader
image-minimizer-webpack-plugin
Webpack loader and plugin to compress images using imagemin
Stars: ✭ 180 (+1025%)
Mutual labels:  webpack-loader

webpack-webmanifest-loader

Minimalistic webpack loader to generate webmanifest file (and process icons URLs).

  • Compatible with webpack 5 only (5.1+ required).
  • Zero dependency.
  • Cache busting support.

Getting Started

npm install -D webpack-webmanifest-loader

manifest.webmanifest

{
  "name": "HackerWeb",
  "icons": [
    {
      "src": "../images/touch/homescreen48.png",
      "sizes": "48x48",
      "type": "image/png"
    }
  ]
}

index.html

<head>
  <title>Example</title>
  <link rel="manifest" href="<%= require('../layout/base/manifest.webmanifest') %>" />
</head>

Then add the loader to your webpack config. For example:

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|svg|webp|jpg|jpeg)$/i,
        type: 'asset/resource',
      },
      {
        test: /\.webmanifest$/i,
        use: 'webpack-webmanifest-loader',
        type: 'asset/resource',
      },
    ],
  },
};

With the default options, the example above will create a [contenthash].webmanifest file in the output directory for the build.

{
  "name": "HackerWeb",
  "icons": [
    {
      "src": "[contenthash].[ext]",
      "sizes": "48x48",
      "type": "image/png"
    },
  ],
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].