Search code examples
javascriptnode.jswebpackwebpack-2

How can I avoid using the optional resolve option in config for Webpack 2?


I'm playing with the newly released second version of Webpack. I got the following error message.

Invalid configuration object... These properties are valid:
object { amd?, bail?, ..., devtool?, entry, ..., output?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, ... }

I also got the following error.

configuration.resolve.extensions[0] should not be empty.

This is confusing because in the first message, it's implied by the question mark that resolve is optional (as opposed to the other highlighted option entry which is required, as indicated by the absence of the question mark).

Am I ignorant of the meaning of the question mark in this context? Is it a typo? Did I get confused by something totally different?


Solution

  • I'm going to put this under answer because I think I've solved your real issue:

    new webpack docs: https://webpack.js.org/

    EDIT: Specifically, https://webpack.js.org/configuration/resolve/