Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
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

© 2023 Gatsby, Inc.