@microsoft/loader-load-themed-styles 1.9.172 → 1.9.175

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.29.4"
8
+ "packageVersion": "7.29.5"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/loader-load-themed-styles",
3
- "version": "1.9.172",
3
+ "version": "1.9.175",
4
4
  "description": "This simple loader wraps the loading of CSS in script equivalent to `require('load-themed-styles').loadStyles( /* css text */ )`. It is designed to be a replacement for style-loader.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -19,13 +19,13 @@
19
19
  "@types/webpack": "^4"
20
20
  },
21
21
  "dependencies": {
22
- "@microsoft/load-themed-styles": "1.10.290",
22
+ "@microsoft/load-themed-styles": "1.10.293",
23
23
  "loader-utils": "~1.1.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@rushstack/eslint-config": "3.0.0",
27
- "@rushstack/heft": "0.47.5",
28
- "@rushstack/heft-node-rig": "1.10.5",
27
+ "@rushstack/heft": "0.47.6",
28
+ "@rushstack/heft-node-rig": "1.10.8",
29
29
  "@types/heft-jest": "1.0.1",
30
30
  "@types/loader-utils": "1.1.3",
31
31
  "@types/node": "12.20.24",
@@ -35,6 +35,5 @@
35
35
  "build": "heft build --clean",
36
36
  "_phase:build": "heft build --clean",
37
37
  "_phase:test": "heft test --no-build"
38
- },
39
- "readme": "# @microsoft/loader-load-themed-styles\n\n## Installation\n\n`npm install @microsoft/loader-load-themed-styles --save-dev`\n\n## Overview\n\nThis simple Webpack loader that wraps the loading of CSS in script equivalent\nto `require(\"load-themed-styles\").loadStyles( /* css text */ )`.\nIt is designed to be a replacement for style-loader.\n\n## Usage\n\n[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)\n\nThis loader is designed to be used in conjunction with css-loader.\n\n``` javascript\nvar css = require(\"@microsoft/loader-load-themed-styles!css!./file.css\");\n// => returns css code from file.css, uses load-themed-styles to load the CSS on the page.\n```\n\n### Example config\n\n``` javascript\n use: [\n {\n loader: \"@microsoft/loader-load-themed-styles\", // creates style nodes from JS strings\n options: {\n namedExport: 'default',\n async: false\n }\n },\n {\n loader: \"css-loader\", // translates CSS into CommonJS\n options: {\n modules: true,\n importLoaders: 2,\n localIdentName: '[name]_[local]_[hash:base64:5]',\n minimize: false\n }\n },\n {\n loader: 'postcss-loader',\n options: {\n plugins: function () {\n return [\n require('autoprefixer')\n ];\n }\n }\n },\n {\n loader: \"sass-loader\",\n }\n ]\n\n```\n\n## Options\n\n### `namedExport` (string, defaults to `undefined`)\n\nBy default, css modules will be exported as a commonjs export:\n\n```js\nmodule.exports = { ... };\n```\n\nTo override this, you may provide a named export to export to a specifically named thing. This\nis useful in exporting as the default in es6 module import scenarios. For example, providing\n\"default\" for the named export will output this:\n\n```js\nmodule.exports.default = { ... };\n```\n\n### `async` (boolean, defaults to `false`)\n\nBy default, `@microsoft/load-themed-styles` loads styles synchronously. This can have adverse performance effects\nif many styles are loaded in quick succession. If the `async` option is set to `true`, the `loadStyles` function\nis called with the second parameter set to `true`, directing the function to debounce style loading causing fewer\nchanges to the DOM.\n\n\n## Links\n\n- [CHANGELOG.md](\n https://github.com/microsoft/rushstack/blob/main/webpack/loader-load-themed-styles/CHANGELOG.md) - Find\n out what's new in the latest version\n\n`@microsoft/loader-load-themed-styles` is part of the [Rush Stack](https://rushstack.io/) family of projects.\n"
38
+ }
40
39
  }