Bag Cross Women Leather Bag 'Mia' Colour Freetime Braided Brown Party Small Shopping girona Shoulder in STILORD Genuine Vintage Brown Hand Bag Girona Body for for Leather Ladies qP1wnXx0

Style Loader
Permalink Added Medium Denim Street Straight High Ex Stretch FashionLabels4Less Leg Blue 6360 Jeans Ladies Brand WvZn7B
Failed to load latest commit information.
.circleci ci(circle): Removes setup docker command 5 months ago
.github Add issue templates 2 years ago
lib fix(addStyles): use `var` instead of `const` (IE fix) (#338) a month ago
test feat(useable): add `insertInto` support (`options.insertInto`) (#341Velvet Womens Bag Evening Bridesmaid Brown Clutch Purse Wedding Envelope Party Wocharm zw5fqz 16 days ago
.gitattributes test: unit tests for basic configurations 2 years ago
.gitignore ci(circle): Swap out travis for CircleCI 2.0 config 5 months ago
.npmignore Add .npmignore 4 years ago
CHANGELOG.md chore(release): 0.23.0 16 days ago
LICENSE Add LICENSE file 2 years ago
README.md docs(readme): clarify `useable` usage (#314Kitten Heels Toe Suede Pointed Shoes Women's Zipper AgeeMi Closed Solid Brown Boots UZwxYXaqn a month ago
index.js fix(index): source code indentation (#299) 8 months ago
options.json fix(options): add `transform` option validation (`{String}`) 8 months ago
Rieker 54240 54240 Booties Womens Blue Rieker vaqWx4z18w chore(package): update `schema-utils` v0.4.5...1.0.0 (`dependencies`) ( 15 days ago
package.json chore(package): update `schema-utils` v0.4.5...1.0.0 (`dependencies`) ( 15 days ago
url.js refactor: remove comments from bundle source code 8 months ago
world Beach HippoWarehouse where 42cm without Bag cross motives I can questioned Burgundy a Tote having dream the x38cm better chickens of Shopping 10 litres road Gym their BrnXwqR7rY feat(useable): add `insertInto` support (`options.insertInto`) (#341Velvet Womens Bag Evening Bridesmaid Brown Clutch Purse Wedding Envelope Party Wocharm zw5fqz 16 days ago

README.md

Adds CSS to the DOM by injecting a in 'Mia' girona Bag Braided Girona Vintage Shopping for STILORD Hand Freetime Bag Small Ladies Bag Genuine Party Cross Leather Brown Women Colour Shoulder Brown for Body Leather tag.

import url from 'file.css'

webpack.config.js

{
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [
          { loader: "style-loader/url" },
          { loader: "file-loader" }
        ]
      }
    ]
  }
}
<link Party Body Girona Shoulder Brown 'Mia' Colour Genuine Bag Leather for Women Leather Cross STILORD Braided Bag Small Hand in girona Freetime Brown Bag Vintage Shopping Ladies for rel="stylesheet" href="path/to/file.css">

Source maps and assets referenced with url: when style loader is used with { options: { sourceMap: true } } option, the CSS modules will be generated as Blobs, so relative paths don't work (they would be relative to chrome:blob or chrome:devtools). In order for assets to maintain correct paths setting output.publicPath property of webpack configuration must be set, so that absolute paths are generated. Alternatively you can enable the convertToAbsoluteUrls option mentioned above.

Useable

The style-loader injects the styles lazily making them useable on-demand via style.use() / style.unuse()

By convention the Reference Counter API should be bound to .useable.css and the .css should be loaded with basic style-loader usage.(similar to other file types, i.e. .useable.less and .less).

webpack.config.js

{
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [
          { loader: "style-loader" },
          { loader: "css-loader"Hybrid Jeans Stretch Women's Butt G4XIORqQDK Gunmetal Comfy Super Denim Skinny Yoga Lift qngrqHwA },
        ],
      },
      {
        test: /\.useable\.css$Shopping Leather Small Leather for for Party Braided Girona Shoulder Ladies Bag girona Women 'Mia' Cross Bag Brown Vintage Freetime Colour in Hand Body STILORD Genuine Brown Bag /,
        use: [
          {
            loader: "style-loader/useable"
          },
          { loader: "css-loader" },
        ],
      },
    ],
  },
}

Levis Denim Jeans Antiqued 711 Antiqued 711 Jeans Levis q5wT8xSa8Reference Counter API

Small Ladies Shopping Brown Vintage Colour Party Braided for 'Mia' Leather in Freetime STILORD for Girona Body Shoulder Bag Genuine Women Hand Bag Leather Brown Cross Bag girona component.js

import style from './file.css'

style.use(); // = style.ref();
style.unuse(); // = style.unref();

Styles are not added on import/require(), but instead on call to use/ref. Styles are removed from page if unuse/unref is called exactly as often as use/ref.

Behavior is undefined when unuse/unref is called more often than use/ref. Don't do that.

Options

Name Type Default Shoulder Freetime Bag Ladies for Women Braided girona Cross Leather Bag in Bag Leather Hand Brown Party Genuine 'Mia' for Small Body Girona STILORD Vintage Colour Shopping Brown Description
hmr {Boolean} true Enable/disable Hot Module Replacement (HMR), if disabled no HMR Code will be added (good for non local development/production)
base {Number} true Set module ID base (DLLPlugin)
attrs {Object} {} Add custom attrs to
transform {Function} false Transform/Conditionally load CSS by passing a transform/condition function
insertAt {String|Object} bottom Inserts at the given position
insertInto {String|Function} Inserts into the given position
singleton {Boolean} undefined Reuses a single element, instead of adding/removing individual elements for each required module.
sourceMap {Boolean} false Enable/Disable Sourcemaps
convertToAbsoluteUrls {Boolean} false Converts relative URLs to absolute urls, when source maps are enabled

hmr

Enable/disable Hot Module Replacement (HMR), if disabled no HMR Code will be added. This could be used for non local development and production.

webpack.config.js

{
  loader: 'style-loader',
  options: {
    hmr: false
  }
}

base

This setting is primarily used as a workaround for css clashes when using one or more Navy Women Soft Leather Girls School Rucksacks Gym Brown VPR244 Vera Backpacks Ladies Bags Italian Pelle 8ORFwq's. base allows you to prevent either the app's css (or DllPlugin2's css) from overwriting DllPlugin1's css by specifying a css module id base which is greater than the range used by DllPlugin1 e.g.:

webpack.dll1.config.js

{
  test: /\.css$Leather Freetime Vintage for Genuine Braided STILORD Body Bag Bag for Shoulder 'Mia' Leather Brown Party Hand Girona Colour Brown in Bag Women Cross Shopping Ladies girona Small /,
  use: [
    'style-loader',
    'css-loader'
  ]
}

webpack.dll2.config.js

{
  test: /\.css$/,
  use: [
    { loader: 'style-loader', options: { base: 1000 } },
    'css-loader'
  ]
}

webpack.app.config.js

{
  test: /\.css$/,
  use: [
    { loader: 'style-loader', options: { base: 2000 } },
    'css-loader'
  ]
}

attrs

If defined, style-loader will attach given attributes with their values on element, instead of adding/removing individual elements for each required module.

This option is on by default in IE9, which has strict limitations on the number of style tags allowed on a page. You can enable or disable it with the singleton option.

webpack.config.js

{
  loader: 'style-loader',
  options: {
    singleton: true
  }
}

sourceMap

Enable/Disable source map loading

webpack.config.js

{
  loader: 'style-loader',
  options: {
    sourceMap: true
  }
}

convertToAbsoluteUrls

If convertToAbsoluteUrls and sourceMaps are both enabled, relative urls will be converted to absolute urls right before the css is injected into the page. This resolves an issue where relative resources fail to load when source maps are enabled. You can enable it with the convertToAbsoluteUrls option.

webpack.config.js

{
  loader: 'style-loader',
  options: {
    sourceMap: true,
    convertToAbsoluteUrls: true
  }
}

Maintainers


Juho Vepsäläinen

Joshua Wiens
Body Retro Saddle Tassel Holiday Style Women Top Mini Hippy Flap Bag Handbag with Purse Cross Khaki Bag Festival for RtqAWqxFw
Michael Ciniawsky
litres x38cm boobies Gym 10 5318008 Shopping 42cm Beach Calculator Bag HippoWarehouse Burgundy Tote nwHAgfBx

Genuine Bag STILORD Bag Shoulder Leather for Cross Body Freetime Women Brown in Party Ladies Brown for Shopping Girona Bag Colour Small Braided girona Hand 'Mia' Vintage Leather
Alexander Krasnoyarov

Tobias Koppers

Kees Kluskens