Skip to content

Commit 8e85231

Browse files
committed
Fixes #203.
Stable Version 4.4.1
1 parent 84616a9 commit 8e85231

File tree

5 files changed

+25
-4
lines changed

5 files changed

+25
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##### 4.4.1 12 October 2015
2+
3+
- #203 - trouble: bundle with r.js not works
4+
15
##### 4.4.0 12 October 2015
26

37
- #200 - 4.3 storagePrefix is not backwards compatible

Gruntfile.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,23 @@ module.exports = function (grunt) {
8080
]
8181
},
8282
plugins: [
83+
{
84+
apply: function (compiler) {
85+
compiler.plugin('compilation', function (compilation) {
86+
compilation.plugin('optimize-chunk-assets', function (chunks, callback) {
87+
chunks.forEach(function (chunk) {
88+
if (chunk.initial) {
89+
chunk.files.forEach(function (file) {
90+
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)');
91+
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)');
92+
});
93+
}
94+
});
95+
callback();
96+
});
97+
});
98+
}
99+
},
83100
new webpack.BannerPlugin(banner)
84101
]
85102
}

dist/angular-cache.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
if(typeof exports === 'object' && typeof module === 'object')
1212
module.exports = factory(require("angular"));
1313
else if(typeof define === 'function' && define.amd)
14-
define(["angular"], factory);
14+
define("angular-cache", ["angular"], factory);
1515
else if(typeof exports === 'object')
1616
exports["angularCacheModuleName"] = factory(require("angular"));
1717
else
@@ -122,7 +122,7 @@ return /******/ (function(modules) { // webpackBootstrap
122122
if(true)
123123
module.exports = factory();
124124
else if(typeof define === 'function' && define.amd)
125-
define([], factory);
125+
define("cachefactory", [], factory);
126126
else if(typeof exports === 'object')
127127
exports["CacheFactory"] = factory();
128128
else

dist/angular-cache.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)