Search code examples
javascriptwebpackbundlerentry-point

What does happen with webpack when entry point is not defined?


What does happen when entry point is not defined in webpack configuration? Which files should be processed by webpack in that case?


Solution

  • If it is not defined and the version you are using is >= webpack v4, it by default points to ./src/ which will take in consideration the index file inside src.

    When ./src/index does not exist, webpack throws an error.