babel-plugin-file-loader icon indicating copy to clipboard operation
babel-plugin-file-loader copied to clipboard

Extensions with two dots in them don't appear to work (e.g. `module.less`)

Open Robbie-Cook opened this issue 3 years ago • 0 comments

Steps to reproduce:

  1. Add plugin to babel config:
    [
      'file-loader',
      {
        name: '[hash].[ext]',
        extensions: ['module.less'],
        publicPath: '../public',
        outputPath: '/dist/public',
        context: '',
        limit: 0,
      },
    ],

Note that .module.less files are not processed. Adjusting config to:

    [
      'file-loader',
      {
        name: '[hash].[ext]',
        extensions: ['less'],
        publicPath: '../public',
        outputPath: '/dist/public',
        context: '',
        limit: 0,
      },
    ],

does work, however, our project has both less and module.less files in them, and it would be fantastic to preserve the extension.

i.e., I would love to have var styles = "../public/ad601f0b2f6a9b05a5f9bbf74cce6bec.module.less" as an output

Robbie-Cook avatar Nov 06 '21 01:11 Robbie-Cook