mirror of https://github.com/webpack/webpack.git
parent
c2a8b8a843
commit
dd73373d86
|
|
@ -32,7 +32,7 @@ ConstPlugin.prototype.apply = function(compiler) {
|
|||
var bool = param.asBool();
|
||||
if(typeof bool === "boolean") {
|
||||
if(expression.test.type !== "Literal") {
|
||||
var dep = new ConstDependency(bool + "", param.range);
|
||||
var dep = new ConstDependency(" " + bool + "", param.range);
|
||||
dep.loc = expression.loc;
|
||||
this.state.current.addDependency(dep);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
it("should not crash on missing spaces", function() {
|
||||
(function() {
|
||||
return"function"==typeof define&&define.amd?"hello":"world";
|
||||
})();
|
||||
});
|
||||
Loading…
Reference in New Issue