Closed
Description
Moved from webpack/webpack#3571
Experience has shown that it is easy to fall into a trap like this:
// a.js
import 'whatever';
module.exports = function foo () {};
// b.js
import a from './a.js'; // error, no default member found in a
a.foo();
Much code has been written like this and it used to work in Webpack 2 beta, which only exacerbates the problem of spec-incompliant code like above. Webpack's doc seems to advertise the ability to mix and match different module syntax without mentioning gotchas. I suggest that Webpack should actively discourage this practice when possible, and point people to tools such as eslint-plugin-import to help fix their code.