@@ -59,18 +59,13 @@ class Module extends DependenciesBlock {
5959 // TODO refactor: pass as constructor argument
6060 this . context = null ;
6161 this . resolveOptions = EMPTY_RESOLVE_OPTIONS ;
62+ this . factoryMeta = { } ;
6263
6364 // Info from Build
64- this . sideEffectFree = false ;
6565 this . warnings = [ ] ;
6666 this . errors = [ ] ;
67- this . strict = false ;
68- this . meta = { } ;
69- this . exportsArgument = "exports" ;
70- this . moduleArgument = "module" ;
71- this . assets = null ;
72- this . fileDependencies = undefined ;
73- this . contextDependencies = undefined ;
67+ this . buildMeta = undefined ;
68+ this . buildInfo = undefined ;
7469
7570 // Graph (per Compilation)
7671 this . reasons = [ ] ;
@@ -96,6 +91,14 @@ class Module extends DependenciesBlock {
9691 this . _rewriteChunkInReasons = undefined ;
9792 }
9893
94+ get exportsArgument ( ) {
95+ return this . buildInfo && this . buildInfo . exportsArgument || "exports" ;
96+ }
97+
98+ get moduleArgument ( ) {
99+ return this . buildInfo && this . buildInfo . moduleArgument || "module" ;
100+ }
101+
99102 disconnect ( ) {
100103 this . hash = undefined ;
101104 this . renderedHash = undefined ;
@@ -288,6 +291,8 @@ class Module extends DependenciesBlock {
288291 }
289292
290293 unbuild ( ) {
294+ this . buildMeta = undefined ;
295+ this . buildInfo = undefined ;
291296 this . disconnect ( ) ;
292297 }
293298
@@ -320,6 +325,16 @@ Object.defineProperty(Module.prototype, "chunks", {
320325 }
321326} ) ;
322327
328+ Object . defineProperty ( Module . prototype , "meta" , {
329+ configurable : false ,
330+ get : util . deprecate ( function ( ) {
331+ return this . buildMeta ;
332+ } , "Module.meta was renamed to Module.buildMeta" ) ,
333+ set : util . deprecate ( function ( value ) {
334+ this . buildMeta = value ;
335+ } , "Module.meta was renamed to Module.buildMeta" ) ,
336+ } ) ;
337+
323338Module . prototype . identifier = null ;
324339Module . prototype . readableIdentifier = null ;
325340Module . prototype . build = null ;
0 commit comments