JSPM

  • Created
  • Published
  • Downloads 22453063
  • Score
    100M100P100Q258770F

css loader module for webpack

Package Exports

  • css-loader
  • css-loader/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (css-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

css loader for webpack

Usage

var css = require("css!./file.css");
// => returns css code from file.css, resolves imports and url(...)

@import will be required with this css loader.

url(...) will be required with the loader specified in the options. If options.css.requireUrl is a string it will be prefixed to the required url. If it isn't a string url(...) will not be replaced. options.css.requireUrl defaults to "file/auto!".

A alternative to the file-loader is the url-loader which can use Data Urls. The use it specify "url/auto!".

Don't forget to polyfill require if you want to use it in node. See webpack documentation.

License

MIT (http://www.opensource.org/licenses/mit-license.php)