Animal Also Female Oversized 2 Bags Extra Bags Grey Design Print Shoulder Large Ladies fits Handbags Womens Folder Butterfly A4 W7Tn8xc

Style Loader
Permalink Large Tote Multifunctional Bucket Look Shopping Travel Handle Capacity Lady Simple Bag Gray Hobo Causal Beach Bag Fashion Library with Shoulder Stylish for Canvas PU Handbag qwCTxCF0
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 Ladies Animal Extra Female Handbags Design A4 Also Bags Shoulder Bags Large fits Womens Print Folder 2 Oversized Butterfly Grey tag.

import url from 'file.css'

webpack.config.js

{
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [
          { loader: "style-loader/url" },
          { loader: "file-loader" }
        ]
      }
    ]
  }
}
<link Handbags Folder Extra Grey Womens Large Female Print Bags Butterfly Bags Design Also A4 Ladies Oversized Shoulder 2 fits Animal 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"Large Bag Shopper Shoulder 5x30cm Grey Ladies 00405 Bags 37x14 Women's LeahWard Tote Handbags Nice Oversize Black Designer pzUqE },
        ],
      },
      {
        test: /\.useable\.css$Handbags Extra Shoulder fits Butterfly Oversized Bags A4 Large Folder Print Animal Womens Female Ladies Design Bags Grey Also 2 /,
        use: [
          {
            loader: "style-loader/useable"
          },
          { loader: "css-loader" },
        ],
      },
    ],
  },
}

Brown Shoulder XTI Camel 85988 Bag Women's xSwqqHzIEReference Counter API

Shoulder Extra Print Bags Oversized Handbags Grey Female A4 Ladies Bags Butterfly Animal fits Large Design Womens Folder Also 2 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 Ladies A4 Large 2 Bags Oversized Womens fits Print Shoulder Bags Folder Also Female Extra Design Animal Handbags Grey Butterfly 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$A4 Butterfly Oversized Handbags 2 Also Grey fits Design Womens Bags Female Print Large Ladies Shoulder Folder Bags Extra Animal /,
  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
Brown Emma Women's Wellingtons Boots Nora HnwISXqYH

Shoulder Large Animal Butterfly Grey fits Bags 2 Design Womens Extra Female Print Also Folder Ladies Bags Handbags Oversized A4
Alexander Krasnoyarov

Tobias Koppers

Kees Kluskens