On this page

class webpack.CssParser extends Parser

Defines the parser state base type used by this module.

new CssParser(): CssParser
Returns:CssParser
Attributes
comments:CommentCssParser[]
defaultMode:"global" | "auto" | "local" | "pure"
magicCommentContext:Context
options:{ animation: boolean; container: boolean; customIdents: boolean; dashedIdents: boolean; defaultMode?: "global" | "auto" | "local" | "pure"; exportType?: "link" | "text" | "css-style-sheet" | "style"; function: boolean; grid: boolean; import: boolean; namedExports: boolean; pure?: boolean; url: boolean }
getComments(range): CommentCssParser[]
Attributes
range:[number, number]

Returns comments in the range.


parse(source, state): ParserState
Attributes
source:string | Buffer<ArrayBufferLike> | PreparsedAst
Returns:ParserState

Parses the provided source and updates the parser state.


parseCommentOptions(range): { errors: (Error & { comment: CommentCssParser })[] | null; options: Record<string, any> | null }
Attributes
range:[number, number]
Returns:{ errors: (Error & { comment: CommentCssParser })[] | null; options: Record<string, any> | null }

Parses comment options.

Attributes
loc:{ end: Position; start: Position }
range:[number, number]
value:string

Attributes
column:number
line:number