-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Closed
Labels
Description
Hi there, I tried out the ES6 module support in Webpack 2.0.1-beta. Modules with ES6 export statements like:
export function foo() { }
// or
export const NUM_THINGS = 23;
// or even
let a = 1, b = 2;
export {a, b};
all seem to be crashing Webpack in HarmonyExportDependencyParserPlugin, when it does the isImmutableStatement() check. The problem seems to be that whenever an "export specifier" statement is encountered, statement.declaration
is null.
After hacking the code to act as though isImmutableStatement
and isHoistedStatement
always returned false, I was able to get ES6 exports to work (and they work great! Nice work, thank you 😄 ), but I'm not sure what the correct fix is here. Nothing that I parse with acorn seems to produce an AST where statement.declaration
is non-null in this situation.