Check out my GitHub project (it's a small example). Feel free to explore any files I'm referring to.
My application works fine without minifying JS/CSS. Routes and controllers function as expected.
However, when I deploy the application, it stops working. No 404 errors or JavaScript issues, everything seems correct in Fiddler with styles.min.css and bootstrap.js loading properly.
I'm using Grunt for deployment. Here is my Gruntfile.js. This is the requirejs task code:
requirejs: {
js: {
options: {
uglify2: {
mangle: false
},
baseUrl: "public/js",
mainConfigFile: "public/js/bootstrap.js",
name: 'bootstrap',
out: "build/js/bootstrap.js",
optimize: 'uglify2'
}
}
},
Why am I encountering this issue?
Max: What exactly is the problem? What am I doing wrong?
Min: How can I debug my minified code? All debuggers and console.log are removed from the code. Having debuggers would help me identify where the code fails...
UPD
Note, how I include views... Could this approach be causing problems?
Also, I can't find myCtrl in bootstrap.js (output file). Why is it not included there?
Thank you