multi-loader icon indicating copy to clipboard operation
multi-loader copied to clipboard

Module build failed: TypeError: this.query.substr is not a function

Open waleedahmed3045 opened this issue 7 years ago • 0 comments

  • Operating System: macOS High Sierra
  • Node Version: 10.13.5
  • NPM Version: 5.6.0
  • webpack Version: 4.4.1
  • webpack-serve Version: 3.1.4

This issue is for a:

  • [x] bug

Code

rules: [ { test: /.js$/, include: path.resolve("./src/scripts/"), loader: multi("ng-annotate-loader","babel-loader?cacheDirectory=true"), options: { presets: ["es2015"] } },

CLI Command

webpack-dev-server

webpack.config.js

Link to Webpack Config Gist

Expected Behavior

The build should make expected files and run the server

Actual Behavior

Getting this error Module build failed: TypeError: this.query.substr is not a function at Object.module.exports.pitch(/node_modules/multi-loader/index.loader.js:4:36)

which is this line var items = JSON.parse(this.query.substr(1));

How Do We Reproduce?

Run the webpack-dev-server command

waleedahmed3045 avatar Jun 11 '18 17:06 waleedahmed3045