diff --git a/build/post-compile.js b/build/post-compile.js index 2d1da80be..0ee398d7f 100644 --- a/build/post-compile.js +++ b/build/post-compile.js @@ -44,6 +44,11 @@ return (other ? other + ' ' : '') + expression + equality + type; }); + // add a space so `define` is detected by the Dojo builder + source = source.replace(/.define\(/, function(match) { + return (/^\S/.test(match) ? ' ' : '') + match; + }); + // add trailing semicolon if (source) { source = source.replace(/[\s;]*?(\s*\/\/.*\s*|\s*\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/\s*)*$/, ';$1');