diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -44,18 +44,25 @@ function CacheModule(cacheItem) {
     return cacheItem.map;
   };
   source.node = function() {
-    n = SourceNode.fromStringWithSourceMap(
+    var node = SourceNode.fromStringWithSourceMap(
       cacheItem.source,
       new SourceMapConsumer(cacheItem.map)
     );
-    // Rehydrate source keys
-    var sources = Object.keys(n.sourceContents);
+    // Rehydrate source keys, webpack 1 uses source-map 0.4 which needs an
+    // appended $. webpack 2 uses source-map 0.5 which may append $. Either way
+    // setSourceContent will provide the needed behaviour. This is pretty round
+    // about and ugly but this is less prone to failure than trying to determine
+    // whether we're in webpack 1 or 2 and if they are using webpack-core or
+    // webpack-sources and the version of source-map in that.
+    var setSourceContent = new RawModule('').source().node().setSourceContent;
+    var sources = Object.keys(node.sourceContents);
     for (var i = 0; i < sources.length; i++) {
       var key = sources[i];
-      n.sourceContents['$' + key] = n.sourceContents[key];
-      delete n.sourceContents[key];
+      var content = node.sourceContents[key];
+      delete node.sourceContents[key];
+      setSourceContent.call(node, key, content);
     }
-    return n;
+    return node;
   };
   source.listMap = function() {
     return fromStringWithSourceMap(cacheItem.source, cacheItem.map);
Improve source content key hydration

webpack 1 and 2 depend on different source-map versions which have
different source content name behaviour. To resolve this when
rehydrating the SourceNode for the Source.node method we reach into
RawModule's returned RawSource instance which will come from
webpack-core for webpack 1 and webpack-sources for webpack 2. We can
then get a SourceNode from RawSource and steal SourceNode's
setSourceContent function which will perform the right rehydration
behaviour for the active version of webpack.