What's needed for Webpack 2: better documentation.
Indeed! I gave up trying to configure it to load files relative to the root and just lived with all the import '../../../lib/compents/...'. I just tried the new beta and – surprise – it works! I still think the structure of, say, Grunt is much nicer to work with – it's just code and easy to understsand & modify. Webpack has what must be the most awkward configuration file format currently in use. The website also loo…
For example, if your entry point is in "/src/application.js", it can require('components/something') from folder "/src/node_modules/components/something". And that works in native Node, Browserify and Webpack, so you're not tied to a specific build tool.
Any module in /src (and subfolders) first searches for modules in "/src/node_modules", but can still also load thirdparty npm-installed modules from the root "/node_modules".