Skip to content

Commit

Permalink
Fixes #203.
Browse files Browse the repository at this point in the history
Stable Version 4.4.1
  • Loading branch information
jmdobry committed Oct 13, 2015
1 parent 84616a9 commit 8e85231
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
##### 4.4.1 12 October 2015

- #203 - trouble: bundle with r.js not works

##### 4.4.0 12 October 2015

- #200 - 4.3 storagePrefix is not backwards compatible
Expand Down
17 changes: 17 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@ module.exports = function (grunt) {
]
},
plugins: [
{
apply: function (compiler) {
compiler.plugin('compilation', function (compilation) {
compilation.plugin('optimize-chunk-assets', function (chunks, callback) {
chunks.forEach(function (chunk) {
if (chunk.initial) {
chunk.files.forEach(function (file) {
compilation.assets[file]._source.children[0].children[0]._value = compilation.assets[file]._source.children[0].children[0]._value.replace('define(["angular"], factory)', 'define("angular-cache", ["angular"], factory)');
compilation.assets[file]._source.children[0].children[1].children[5].children[11].children[1]._source._source._source._value = compilation.assets[file]._source.children[0].children[1].children[5].children[11].children[1]._source._source._source._value.replace('define([], factory)', 'define("cachefactory", [], factory)');
});
}
});
callback();
});
});
}
},
new webpack.BannerPlugin(banner)
]
}
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("angular"));
else if(typeof define === 'function' && define.amd)
define(["angular"], factory);
define("angular-cache", ["angular"], factory);
else if(typeof exports === 'object')
exports["angularCacheModuleName"] = factory(require("angular"));
else
Expand Down Expand Up @@ -122,7 +122,7 @@ return /******/ (function(modules) { // webpackBootstrap
if(true)
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
define("cachefactory", [], factory);
else if(typeof exports === 'object')
exports["CacheFactory"] = factory();
else
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-cache.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 8e85231

Please sign in to comment.