question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webapack 2 - It's no longer allowed to omit the '-loader' suffix when using loaders.

See original GitHub issue

I keep getting this error It's no longer allowed to omit the '-loader' suffix when using loaders. when trying either:

      {
        test: /.*\.(gif|png|jpe?g|svg)$/i,
        loaders: [
          'file-loader',
          {
            loader: 'image-webpack-loader',
            query: {
              progressive: true,
              optimizationLevel: 7,
              interlaced: false,
              pngquant: {
                quality: '65-90',
                speed: 4
              }
            }
          }
        ]
      }

or just using loader: 'image-webpack-loader',

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

65reactions
yusuf987commented, Feb 4, 2017

The error “It’s no longer allowed to omit the ‘-loader’ suffix when using loaders.” is simply saying you need to append -loader where you are using loader, like if you are using babel as a loader then you need to put “babe-loader”

eg : wrong 
 module: {
      loaders: [
         {
            test: /\.jsx?$/,
            exclude: /node_modules/,
            loader: 'babel',
				
            query: {
                presets: ['es2015', 'react']
            }
         }
      ]
   }

eg: correct 
 module: {
      loaders: [
         {
            test: /\.jsx?$/,
            exclude: /node_modules/,
            loader: 'babel-loader',
				
            query: {
                presets: ['es2015', 'react']
            }
         }
      ]
   }
7reactions
silvenoncommented, Jul 21, 2017

When I see the amount of upvotes on the comment above, I wonder what isn’t clear about the error message. Would this be better?

It's no longer allowed to omit the '-loader' suffix when specifying loader names.
Read more comments on GitHub >

github_iconTop Results From Across the Web

babeljs - I don't have build files for webpack - Stack Overflow
It's no longer allowed to omit the '-loader' suffix when using loaders. You need to specify 'babel-loader' instead of 'babel'.
Read more >
loader' suffix when using loaders.解决办法- 腾讯云开发者社区
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders. You need to specify 'style-loader' instead of ...
Read more >
为什么出现这种BUG - 慕课网
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders. You need to specify 'babel-loader' instead of 'babel'. ERROR...
Read more >
Javascript – Webpack 2 issues with Semantic UI – iTecNote
Been struggling to get semantic-ui setup using Webpack 2. ... BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using...
Read more >
Loaders - webpack
Loaders are transformations that are applied to the source code of a module. They allow you to pre-process files as you import or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found