Skip to content

Commit 71bbf1d

Browse files
committed
put data on module and not on meta object
1 parent 27e73bf commit 71bbf1d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
214214
return false;
215215
if(!Array.isArray(content) && content != null)
216216
throw new Error("Exported value was not extracted as an array: " + JSON.stringify(content));
217-
module.meta[NS] = {
217+
module[NS] = {
218218
content: content,
219219
options: opt || {}
220220
};
221-
return options.allChunks || module.meta[NS + "/extract"]; // eslint-disable-line no-path-concat
221+
return options.allChunks || module[NS + "/extract"]; // eslint-disable-line no-path-concat
222222
};
223223
});
224224
var filename = this.filename;
@@ -245,17 +245,17 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
245245
var extractedChunk = extractedChunks[chunks.indexOf(chunk)];
246246
var shouldExtract = !!(options.allChunks || chunk.isInitial());
247247
async.forEach(chunk.modules.slice(), function(module, callback) {
248-
var meta = module.meta && module.meta[NS];
248+
var meta = module[NS];
249249
if(meta && (!meta.options.id || meta.options.id === id)) {
250250
var wasExtracted = Array.isArray(meta.content);
251251
if(shouldExtract !== wasExtracted) {
252-
module.meta[NS + "/extract"] = shouldExtract; // eslint-disable-line no-path-concat
252+
module[NS + "/extract"] = shouldExtract; // eslint-disable-line no-path-concat
253253
compilation.rebuildModule(module, function(err) {
254254
if(err) {
255255
compilation.errors.push(err);
256256
return callback();
257257
}
258-
meta = module.meta[NS];
258+
meta = module[NS];
259259
if(!Array.isArray(meta.content)) {
260260
err = new Error(module.identifier() + " doesn't export content");
261261
compilation.errors.push(err);

0 commit comments

Comments
 (0)