fix for RegExp evalutating, change in node-libs-browser
This commit is contained in:
parent
ffc2ace8d6
commit
273506ee34
|
@ -33,6 +33,8 @@ Parser.prototype.initializeEvaluating = function() {
|
|||
case "boolean":
|
||||
return new BasicEvaluatedExpression().setBoolean(expr.value).setRange(expr.range);
|
||||
}
|
||||
if(expr.value instanceof RegExp)
|
||||
return new BasicEvaluatedExpression().setRegExp(expr.value).setRange(expr.range);
|
||||
});
|
||||
this.plugin("evaluate BinaryExpression", function(expr) {
|
||||
if(expr.operator == "+") {
|
||||
|
|
|
@ -14,7 +14,7 @@ module.exports = NodeSourcePlugin;
|
|||
NodeSourcePlugin.prototype.apply = function(compiler) {
|
||||
function ignore() { return true; }
|
||||
compiler.parser.plugin("expression process", function(expr) {
|
||||
return ModuleParserHelpers.addParsedVariable(this, "process", "require(" + JSON.stringify(nodeLibsBrowser.best._process) + ")");
|
||||
return ModuleParserHelpers.addParsedVariable(this, "process", "require(" + JSON.stringify(nodeLibsBrowser._process) + ")");
|
||||
});
|
||||
compiler.parser.plugin("expression global", function(expr) {
|
||||
this.state.current.addVariable("global", "this");
|
||||
|
@ -22,7 +22,7 @@ NodeSourcePlugin.prototype.apply = function(compiler) {
|
|||
});
|
||||
compiler.plugin("after-resolvers", function(compiler) {
|
||||
compiler.resolvers.normal.apply(
|
||||
new ModuleAliasPlugin(nodeLibsBrowser.best)
|
||||
new ModuleAliasPlugin(nodeLibsBrowser)
|
||||
);
|
||||
});
|
||||
};
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webpack",
|
||||
"version": "0.9.0-beta30",
|
||||
"version": "0.9.0-beta31",
|
||||
"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, jade, coffee, css, less, ... and your custom stuff.",
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in New Issue