Skip to main content
  1. All Posts/

css-loader

Software Open Source Web Development

The CSS-loader interprets @import and URL() like import/require() and will resolve them. Add the plugin to your webpack config. Run webpack via your preferred method. Allows to enable/disable handling the CSS functions URL and image-set. If set to false, CSS-loader will not parse any paths specified in URL or image-set. A function can also be passed to control this behavior dynamically based on the path to the asset. Starting with version 4.0.0, absolute paths are parsed based on the server root. Using local value requires you to specify :global classes. Using global value requires you to specify :local classes. Using pure value requires selectors must contain at least one local class or id. Styles can be locally scoped to avoid globally scoping styles. The syntax :local(.className) can be used to declare className in the local scope. The local identifiers are exported by the module.

Features>

Features #

  • Styles can be locally scoped to avoid globally scoping styles
  • Enable CSS Modules features
  • Allows auto enable CSS modules/ICSS based on filename when modules option is object
  • Allows set different values for the mode option based on a filename
  • Configure the generated local ident name
  • Redefine basic loader context for local ident name
Project Samples>

Project Samples #

 

 

Project Activity>

Project Activity #

See All Activity >