I used the typescript-skeletal configuration, with a big change that I create dist/rel/
and dist/src/
for code during debug or release.
bundles.js hence looks like:
module.exports = {
"bundles": {
"dist/rel/app-build": {
"includes": [
"[rel/*.js]",
"rel/*.html!text",
"rel/*.css!text"
],
"options": {
"inject": true,
"minify": true,
"depCache": false,
"rev": false
}
},
"dist/rel/aurelia": {
"includes": [
"aurelia-framework",
"aurelia-bootstrapper",
"aurelia-fetch-client",
"aurelia-router",
"aurelia-animator-css",
"aurelia-templating-binding",
"aurelia-polyfills",
"aurelia-templating-resources",
"aurelia-templating-router",
"aurelia-loader-default",
"aurelia-history-browser",
"aurelia-logging-console",
"bootstrap",
"bootstrap/css/bootstrap.css!text",
"fetch",
"jquery"
],
"options": {
"inject": true,
"minify": true,
"depCache": false,
"rev": false
}
}
}
};
Now this creates an error when I run the gulp bundle.
[03:10:49] Starting 'bundle'...
[03:10:51] 'bundle' errored after 1.37 s
[03:10:51] Error: SyntaxError: Unexpected token: name (App) (line: 14, col: 8, pos: 582)
Error
at new JS_Parse_Error (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:1547:18)
at js_error (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:1555:11)
at croak (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2094:9)
at token_error (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2102:9)
at unexpected (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2108:9)
at semicolon (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2128:56)
at simple_statement (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2319:73)
at eval (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2188:19)
at eval (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2141:24)
at block_ (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2434:20)
at eval (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2406:25)
at function_ (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2412:15)
at expr_atom (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2627:24)
at maybe_unary (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2797:19)
at expr_ops (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2832:24)
at maybe_conditional (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2837:20)
at maybe_assign (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2861:20)
at expression (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2880:20)
at expr_list (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2646:24)
at subscripts (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2780:30)
at expr_atom (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2633:20)
at maybe_unary (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2797:19)
at expr_ops (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2832:24)
at maybe_conditional (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2837:20)
at maybe_assign (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2861:20)
at expression (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2880:20)
at simple_statement (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2319:55)
at eval (eval at <anonymous> (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2188:19)
at minify (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\lib\output.js:80:11)
at exports.writeOutputs (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\lib\output.js:154:14)
at D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\lib\builder.js:702:16
at tryCatcher (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (D:\Paul\Documents\heren5\heren5\node_modules\systemjs-builder\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
This error is too complex and shouldn’t be there. Especially considering the non-minified version is working perfectly fine (I can test it, it bundles etc).
Can anyone give me a pointer on how to debug this? Thanks a lot in advance!