Skip to content

Instantly share code, notes, and snippets.

@a1exlism
Last active March 2, 2018 03:40
Show Gist options
  • Select an option

  • Save a1exlism/be3e603f32e28107930b3a88d40ef19a to your computer and use it in GitHub Desktop.

Select an option

Save a1exlism/be3e603f32e28107930b3a88d40ef19a to your computer and use it in GitHub Desktop.

Refer Link

They perform different operations, but it's often useful to chain them together, like Unix pipes.

  1. affix -loader could be ommited(省略);
  2. order: right to left;
  3. *inx pipe like, chain operation;

For example, if you were using the Less CSS preprocessor, you could use

let cssStyle = require("style!css!less!./file.less");

to

  • Turn file.less into plain CSS with the Less loader
  • Resolve all the imports and url(...)s in the CSS with the CSS loader
  • Insert those styles into the page with the style loader
  • use the cssStyle object in JS/X file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment