new CssModulesPlugin(): CssModulesPluginReturns:
<CssModulesPlugin>apply(compiler): voidAttributes
compiler:
<Compiler>Returns:
<void>Applies the plugin by registering its hooks on the compiler.
getModulesInOrder(chunk, modules, compilation): ModuleAttributes
Gets modules in order.
getOrderedChunkCssModules(chunk, chunkGraph, compilation): CssModuleAttributes
Gets ordered chunk css modules.
renderChunk(renderContextCssModulesPlugin, hooks): SourceAttributes
renderContextCssModulesPlugin:
<RenderContextCssModulesPlugin>Returns:
<Source>Renders generated source.
Attributes
Returns true, when the chunk has css.
Attributes
Gets chunk filename template.
Attributes
compilation:
<Compilation>Returns the attached hooks.
Attributes
module:
<CssModule>renderContext:
<ChunkRenderContextCssModulesPlugin>Renders css module source.
Attributes
chunk:
<Chunk>the chunk
chunkGraph:
<ChunkGraph>the chunk graph
codeGenerationResults:
<CodeGenerationResults>results of code generation
hash:
<string>compilation hash
moduleFactoryCache:
<WeakMap><
<Source>
,
<ModuleFactoryCacheEntry>
> moduleFactoryCachemoduleSourceContent:
<Source>content
runtimeTemplate:
<RuntimeTemplate>the runtime template
undoPath:
<string>undo path to css file
chunkHash<SyncHook><<Tuple><<Chunk>,<Hash>,<ChunkHashContext>>>orderModules<SyncBailHook><<Tuple><<Chunk>,<Module>[],<Compilation>>,<void>|<Module>[] |<undefined>> called for each CSS source type (CSS_IMPORT_TYPE, CSS_TYPE) with the chunk's modules pre-sorted by full module name; return an orderedModule[]to override the default import-order topological sort, or returnundefinedto keep the defaultrenderModulePackage<SyncWaterfallHook><<Tuple><<Source>,<Module>,<ChunkRenderContextCssModulesPlugin>>,<Source>>
Attributes
hash:
<string>The compilation hash
inheritance:
source:
<CachedSource>The cached source
undoPath:
<string>The undo path to the CSS file
Attributes
chunk:
<Chunk>the chunk
chunkGraph:
<ChunkGraph>the chunk graph
codeGenerationResults:
<CodeGenerationResults>results of code generation
hash:
<string>compilation hash
modules:
<CssModule>[] modules
runtimeTemplate:
<RuntimeTemplate>the runtime template
undoPath:
<string>undo path to css file
uniqueName:
<string>the unique name