NEW RELEASE:

Centralized data layer for multiple content sources or frameworks. Dive deep into Valhalla

ContactSign Up for Free
Community Plugin
View plugin on GitHub

gatsby-plugin-force-file-loader npm

Force Webpack to use file-loader instead of url-loader in fonts, images and media rules.

Installation

npm install gatsby-plugin-force-file-loader

Usage

/* gatsby-config.js */

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-force-file-loader'
      options: {
        /* gatsby-plugin-force-file-loader options here */
      }
    }
  ]
}

Options

rules

Type: Array. Default: ['fonts', 'images', 'media'].

The rules that should use file-loader instead of url-loader. By default, all the three types are enabled.

License

The MIT License

© 2022 Gatsby, Inc.