Bumping require.js to latest, but not in Mimosa, yet
Earlier today I released version 3.0.0
of mimosa-require, but I will not be including that version as a default dependency of Mimosa yet.
The version of mimosa-require included with Mimosa by default is 2.2.2
. The only significant difference between 2.2.2
and 3.0.0
is the version of require.js inside those modules. 3.0.0
= require.js 2.1.14
, 2.2.2
= require.js 2.1.6
.
The story is long and complicated, but to keep it short, I won't be updating Mimosa to use require.js 2.1.14
by default until this bug is fixed: https://github.com/jrburke/r.js/issues/629. That bug prevents users of Mimosa who take advantage of mimosa-require's require.optimize.modules
config from running optimized builds. Running optimized builds with require.optimize.modules
would result in require.js erroring out. A minority of Mimosa users likely use that config, but I want to keep Mimosa's defaults at versions that don't break apps.
The latest require.js, 2.1.14
, contains all sorts of improvements over the version Mimosa is currently stuck at, 2.1.6
, including wrapShim
. If you are not using the require.optimize.modules
config, I highly recommend updating your project to use mimosa-require 3.0.0
.
"What should I do?"
Not using require.optimize.modules
? Then you should upgrade to 3.0.0
. Using a specific version of a Mimosa module is easy. Simply update your mimosa-config.js
modules
array to point at the new version.
In your modules
array, update "require"
to "require@3.0.0"
. Here's an example from the Ember skeleton: https://github.com/dbashford/MimosaEmberSkeleton/blob/master/mimosa-config.js#L26
The next time you start up mimosa watch
or mimosa build
Mimosa will install version 3.0.0
of mimosa-require local to your project. Give that a shot: make the update and then re-run your optimized build to verify it still works.