configuration.module has an unknown property ‘preLoaders’

I’m submitting a bug report

Webpack version:
2.1.0-beta.23

Please tell us about your environment:
Windows 10

Current behavior:
When attempting to run webpack, I get told that preLoaders is an invalid property on configuration.module.

 - configuration.module has an unknown property 'preLoaders'. These properties are valid:
   object { rules?, loaders?, noParse?, unknownContextRequest?, unknownContextRegExp?, unknownContextRecursive?, unknownContextCritical?, exprContextRequest?, exprContextRegExp?, exprContextRecursive?, exprContextCritical?, wrappedContextRegExp?, wrappedContextRecursive?, wrappedContextCritical? }
   Options affecting the normal modules (`NormalModuleFactory`).

Expected/desired behavior:
It does not appear to be documented anywhere that preLoaders have been removed or have been modified in some way as to yield these results, so I would expect that it would pass schema validation.

Reduced testcase as follows (change entry/output as needed):

webpack.config.js

module.exports = {
  entry: 'src/index.js',
  output: {
    filename: 'dist/bundle.js'
  },
  module: {
    preLoaders: [{
      test: /\.js$/,
      loader: 'eslint'
    }]
  }
};

package.json

{
  "devDependencies": {
    "eslint": "^3.5.0",
    "eslint-loader": "^1.5.0",
    "webpack": "^2.1.0-beta.23"
  }
}

Author: Fantashit

1 thought on “configuration.module has an unknown property ‘preLoaders’

Comments are closed.