Home > @lynx-js/css-extract-webpack-plugin > LoaderOptions

LoaderOptions interface

The options of CSS extract loader.

Signature:

export interface LoaderOptions 

Properties

PropertyModifiersTypeDescription
emit?boolean

(Optional) The same as mini-css-extract-plugin. Control whether emit the CSS to filesystem.

- If true(default), emits a file (writes a file to the filesystem).

- If false, the plugin will extract the CSS but will not emit the file.

It is often useful to disable this option for server-side packages.

esModule?boolean | undefined(Optional) The same as https://github.com/webpack-contrib/mini-css-extract-plugin#esModule. By default, @lynx-js/css-extract-webpack-plugin generates JS modules that use the ES modules syntax. There are some cases in which using ES modules is beneficial, like in the case of module concatenation and tree shaking.
layer?string | undefined(Optional) The layer of the CSS execution.