mirror of https://github.com/webpack/webpack.git
commit
beb29d8dbd
|
|
@ -536,8 +536,10 @@ Parser.prototype.walkForOfStatement = function walkForOfStatement(statement) {
|
|||
|
||||
// Declarations
|
||||
Parser.prototype.walkFunctionDeclaration = function walkFunctionDeclaration(statement) {
|
||||
this.scope.renames["$" + statement.id.name] = undefined;
|
||||
this.scope.definitions.push(statement.id.name);
|
||||
if(statement.id) {
|
||||
this.scope.renames["$" + statement.id.name] = undefined;
|
||||
this.scope.definitions.push(statement.id.name);
|
||||
}
|
||||
this.inScope(statement.params, function() {
|
||||
if(statement.body.type === "BlockStatement")
|
||||
this.walkStatement(statement.body);
|
||||
|
|
@ -637,8 +639,10 @@ Parser.prototype.walkVariableDeclaration = function walkVariableDeclaration(stat
|
|||
};
|
||||
|
||||
Parser.prototype.walkClassDeclaration = function walkClassDeclaration(statement) {
|
||||
this.scope.renames["$" + statement.id.name] = undefined;
|
||||
this.scope.definitions.push(statement.id.name);
|
||||
if(statement.id) {
|
||||
this.scope.renames["$" + statement.id.name] = undefined;
|
||||
this.scope.definitions.push(statement.id.name);
|
||||
}
|
||||
this.walkClass(statement);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"author": "Tobias Koppers @sokra",
|
||||
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
|
||||
"dependencies": {
|
||||
"acorn": "^4.0.4",
|
||||
"acorn": "^5.0.0",
|
||||
"acorn-dynamic-import": "^2.0.0",
|
||||
"ajv": "^4.7.0",
|
||||
"ajv-keywords": "^1.1.1",
|
||||
|
|
|
|||
Loading…
Reference in New Issue