Closed
Description
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Module with code
// 'a.js'
module.exports = { a: 'b' };
// b.js
const a = require('./a.js').a;
export default {
aa: a
}
Gives error:
Cannot assign to read only property 'exports' of object '#<Object>'
Appeared after upgrade webpack 2.2.0.rc.6 -> 2.2.0.
If 'harmony-module' is ES2015 module, then looks like it's now impossible to mix require
and export default
in single module. If it so, that's okay, but should be mentioned in docs.
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
MacOS 10.12.2
node.js 6.9.2
webpack 2.2