I upgraded my Elixir and Gulp and right now I can see that some of my mixed scripts are broken.
When I hit gulp
or gulp --production
everything seems to be compiled, mixed and versioned fine. Problem is directly on the page. Scripts throw exceptions in the console.
Two broken scripts are right now moment.js
and bootstrap datetimepicker
.
Uncaught TypeError: Cannot set property 'moment' of undefined(anonymous function) @ common-1e3de0f4.js:1(anonymous function) @ common-1e3de0f4.js:1 create:207
Uncaught TypeError: $(...).datetimepicker is not a function
It must have something do to with the fact that I did npm update because all my custom scripts are fine - just these plugins are broken - while I haven't touched them.
I saw that every file is now preceded by 'use strict'; Previously it never happened before.
I really would like to solve it by myself but I have no idea where to start looking for a solution.
My gulpfile.js http://pastebin.com/NQ8f9tGr
Thanks for any help.
This is known issue, in fact Jeffrey is asking for feedback how people want to solve this, you can find more info here and give your opinion.
Also quoting Jeffrey Way on a possible solution:
We have two options:
- You may disable Babel support, if you don't desire it. elixir.config.babel.enabled = false.
- We can blacklist "useStrict", so that it doesn't get included. Not sure we should do this, but it's an option.