{
  "manifest": {
    "name": "sass-loader",
    "version": "12.6.0",
    "description": "Sass loader for webpack",
    "license": "MIT",
    "repository": {
      "type": "git",
      "url": "https://github.com/webpack-contrib/sass-loader.git"
    },
    "author": {
      "name": "J. Tangelder"
    },
    "homepage": "https://github.com/webpack-contrib/sass-loader",
    "bugs": {
      "url": "https://github.com/webpack-contrib/sass-loader/issues"
    },
    "funding": {
      "type": "opencollective",
      "url": "https://opencollective.com/webpack"
    },
    "main": "dist/cjs.js",
    "engines": {
      "node": ">= 12.13.0"
    },
    "scripts": {
      "start": "npm run build -- -w",
      "clean": "del-cli dist",
      "prebuild": "npm run clean",
      "build": "cross-env NODE_ENV=production babel src -d dist --copy-files",
      "commitlint": "commitlint --from=master",
      "security": "npm audit --production",
      "lint:prettier": "prettier --list-different .",
      "lint:js": "eslint --cache .",
      "lint": "npm-run-all -l -p \"lint:**\"",
      "test:only": "cross-env NODE_ENV=test jest",
      "test:watch": "npm run test:only -- --watch",
      "test:manual": "npm run build && webpack-dev-server test/manual/src/index.js --open --config test/manual/webpack.config.js",
      "test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
      "pretest": "npm run lint",
      "test": "npm run test:coverage",
      "prepare": "husky install && npm run build",
      "release": "standard-version"
    },
    "files": [
      "dist"
    ],
    "peerDependencies": {
      "fibers": ">= 3.1.0",
      "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
      "sass": "^1.3.0",
      "sass-embedded": "*",
      "webpack": "^5.0.0"
    },
    "peerDependenciesMeta": {
      "node-sass": {
        "optional": true
      },
      "sass": {
        "optional": true
      },
      "sass-embedded": {
        "optional": true
      },
      "fibers": {
        "optional": true
      }
    },
    "dependencies": {
      "klona": "^2.0.4",
      "neo-async": "^2.6.2"
    },
    "devDependencies": {
      "@babel/cli": "^7.17.0",
      "@babel/core": "^7.17.0",
      "@babel/preset-env": "^7.16.11",
      "@commitlint/cli": "^16.2.1",
      "@commitlint/config-conventional": "^16.2.1",
      "@webpack-contrib/eslint-config-webpack": "^3.0.0",
      "babel-jest": "^27.5.0",
      "bootstrap-sass": "^3.4.1",
      "bootstrap-v4": "npm:bootstrap@^4.5.3",
      "bootstrap-v5": "npm:bootstrap@^5.0.1",
      "cross-env": "^7.0.3",
      "css-loader": "^6.6.0",
      "del": "^6.0.0",
      "del-cli": "^4.0.1",
      "enhanced-resolve": "^5.8.2",
      "eslint": "^8.8.0",
      "eslint-config-prettier": "^8.3.0",
      "eslint-plugin-import": "^2.25.4",
      "fibers": "^5.0.1",
      "file-loader": "^6.2.0",
      "foundation-sites": "^6.6.3",
      "husky": "^7.0.1",
      "jest": "^27.5.0",
      "jest-environment-node-single-context": "^27.2.0",
      "lint-staged": "^12.3.3",
      "material-components-web": "^8.0.0",
      "memfs": "^3.4.1",
      "node-sass": "^7.0.1",
      "node-sass-glob-importer": "^5.3.2",
      "npm-run-all": "^4.1.5",
      "prettier": "^2.3.2",
      "sass": "^1.49.7",
      "sass-embedded": "^1.49.7",
      "semver": "^7.3.5",
      "standard-version": "^9.3.1",
      "style-loader": "^3.2.1",
      "webpack": "^5.68.0"
    },
    "keywords": [
      "sass",
      "libsass",
      "webpack",
      "loader"
    ],
    "_registry": "npm",
    "_loc": "/homez.1033/heliovt/.cache/yarn/v6/npm-sass-loader-12.6.0-5148362c8e2cdd4b950f3c63ac5d16dbfed37bcb-integrity/node_modules/sass-loader/package.json",
    "readmeFilename": "README.md",
    "readme": "<div align=\"center\">\n  <img height=\"170\"\n    src=\"https://worldvectorlogo.com/logos/sass-1.svg\">\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\"\n      src=\"https://webpack.js.org/assets/icon-square-big.svg\">\n  </a>\n</div>\n\n[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![deps][deps]][deps-url]\n[![tests][tests]][tests-url]\n[![coverage][cover]][cover-url]\n[![chat][chat]][chat-url]\n[![size][size]][size-url]\n\n# sass-loader\n\nLoads a Sass/SCSS file and compiles it to CSS.\n\n## Getting Started\n\nTo begin, you'll need to install `sass-loader`:\n\n```console\nnpm install sass-loader sass webpack --save-dev\n```\n\nor\n\n```console\nyarn add -D sass-loader sass webpack\n```\n\nor\n\n```console\npnpm add -D sass-loader sass webpack\n```\n\n`sass-loader` requires you to install either [Dart Sass](https://github.com/sass/dart-sass), [Node Sass](https://github.com/sass/node-sass) on your own (more documentation can be found below) or [Sass Embedded](https://github.com/sass/embedded-host-node).\n\nThis allows you to control the versions of all your dependencies, and to choose which Sass implementation to use.\n\n> ℹ️ We highly recommend using [Dart Sass](https://github.com/sass/dart-sass).\n\n> ⚠ [Node Sass](https://github.com/sass/node-sass) does not work with [Yarn PnP](https://classic.yarnpkg.com/en/docs/pnp/) feature and doesn't support [@use rule](https://sass-lang.com/documentation/at-rules/use).\n\n> ⚠ [Sass Embedded](https://github.com/sass/embedded-host-node) is experimental and in `beta`, therefore some features may not work\n\nChain the `sass-loader` with the [css-loader](https://github.com/webpack-contrib/css-loader) and the [style-loader](https://github.com/webpack-contrib/style-loader) to immediately apply all styles to the DOM or the [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to extract it into a separate file.\n\nThen add the loader to your Webpack configuration. For example:\n\n**app.js**\n\n```js\nimport \"./style.scss\";\n```\n\n**style.scss**\n\n```scss\n$body-color: red;\n\nbody {\n  color: $body-color;\n}\n```\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          // Creates `style` nodes from JS strings\n          \"style-loader\",\n          // Translates CSS into CommonJS\n          \"css-loader\",\n          // Compiles Sass to CSS\n          \"sass-loader\",\n        ],\n      },\n    ],\n  },\n};\n```\n\nFinally run `webpack` via your preferred method.\n\n### Resolving `import` at-rules\n\nWebpack provides an [advanced mechanism to resolve files](https://webpack.js.org/concepts/module-resolution/).\n\nThe `sass-loader` uses Sass's custom importer feature to pass all queries to the Webpack resolving engine.\nThus you can import your Sass modules from `node_modules`.\n\n```scss\n@import \"bootstrap\";\n```\n\nUsing `~` is deprecated and can be removed from your code (**we recommend it**), but we still support it for historical reasons.\nWhy can you remove it? The loader will first try to resolve `@import` as a relative path. If it cannot be resolved, then the loader will try to resolve `@import` inside [`node_modules`](https://webpack.js.org/configuration/resolve/#resolvemodules).\n\nPrepending module paths with a `~` tells webpack to search through [`node_modules`](https://webpack.js.org/configuration/resolve/#resolvemodules).\n\n```scss\n@import \"~bootstrap\";\n```\n\nIt's important to prepend it with only `~`, because `~/` resolves to the home directory.\nWebpack needs to distinguish between `bootstrap` and `~bootstrap` because CSS and Sass files have no special syntax for importing relative files.\nWriting `@import \"style.scss\"` is the same as `@import \"./style.scss\";`\n\n### Problems with `url(...)`\n\nSince Sass implementations don't provide [url rewriting](https://github.com/sass/libsass/issues/532), all linked assets must be relative to the output.\n\n- If you pass the generated CSS on to the `css-loader`, all urls must be relative to the entry-file (e.g. `main.scss`).\n- If you're just generating CSS without passing it to the `css-loader`, it must be relative to your web root.\n\nYou will be disrupted by this first issue. It is natural to expect relative references to be resolved against the `.sass`/`.scss` file in which they are specified (like in regular `.css` files).\n\nThankfully there are a two solutions to this problem:\n\n- Add the missing url rewriting using the [resolve-url-loader](https://github.com/bholloway/resolve-url-loader). Place it before `sass-loader` in the loader chain.\n- Library authors usually provide a variable to modify the asset path. [bootstrap-sass](https://github.com/twbs/bootstrap-sass) for example has an `$icon-font-path`.\n\n## Options\n\n- **[`implementation`](#implementation)**\n- **[`sassOptions`](#sassoptions)**\n- **[`sourceMap`](#sourcemap)**\n- **[`additionalData`](#additionaldata)**\n- **[`webpackImporter`](#webpackimporter)**\n- **[`warnRuleAsWarning`](#warnruleaswarning)**\n\n### `implementation`\n\nType:\n\n```ts\ntype implementation = object | string;\n```\n\nDefault: `sass`\n\nThe special `implementation` option determines which implementation of Sass to use.\n\nBy default the loader resolve the implementation based on your dependencies.\nJust add required implementation to `package.json` (`sass` or `node-sass` package) and install dependencies.\n\nExample where the `sass-loader` loader uses the `sass` (`dart-sass`) implementation:\n\n**package.json**\n\n```json\n{\n  \"devDependencies\": {\n    \"sass-loader\": \"^7.2.0\",\n    \"sass\": \"^1.22.10\"\n  }\n}\n```\n\nExample where the `sass-loader` loader uses the `node-sass` implementation:\n\n**package.json**\n\n```json\n{\n  \"devDependencies\": {\n    \"sass-loader\": \"^7.2.0\",\n    \"node-sass\": \"^5.0.0\"\n  }\n}\n```\n\nBeware the situation when `node-sass` and `sass` were installed! By default the `sass-loader` prefers `sass`.\nIn order to avoid this situation you can use the `implementation` option.\n\nThe `implementation` options either accepts `sass` (`Dart Sass`) or `node-sass` as a module.\n\n#### `object`\n\nFor example, to use Dart Sass, you'd pass:\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              // Prefer `dart-sass`\n              implementation: require(\"sass\"),\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n#### `string`\n\nFor example, to use Dart Sass, you'd pass:\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              // Prefer `dart-sass`\n              implementation: require.resolve(\"sass\"),\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\nNote that when using `sass` (`Dart Sass`), **synchronous compilation is twice as fast as asynchronous compilation** by default, due to the overhead of asynchronous callbacks.\nTo avoid this overhead, you can use the [fibers](https://www.npmjs.com/package/fibers) package to call asynchronous importers from the synchronous code path.\n\nWe automatically inject the [`fibers`](https://github.com/laverdet/node-fibers) package (setup `sassOptions.fiber`) for `Node.js` less v16.0.0 if is possible (i.e. you need install the [`fibers`](https://github.com/laverdet/node-fibers) package).\n\n> Fibers is not compatible with `Node.js` v16.0.0 or later ([see introduction to readme](https://github.com/laverdet/node-fibers)).\n\n**package.json**\n\n```json\n{\n  \"devDependencies\": {\n    \"sass-loader\": \"^7.2.0\",\n    \"sass\": \"^1.22.10\",\n    \"fibers\": \"^4.0.1\"\n  }\n}\n```\n\nYou can disable automatically injecting the [`fibers`](https://github.com/laverdet/node-fibers) package by passing a `false` value for the `sassOptions.fiber` option.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              implementation: require(\"sass\"),\n              sassOptions: {\n                fiber: false,\n              },\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\nYou can also pass the `fiber` value using this code:\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              implementation: require(\"sass\"),\n              sassOptions: {\n                fiber: require(\"fibers\"),\n              },\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n### `sassOptions`\n\nType:\n\n```ts\ntype sassOptions =\n  | import(\"sass\").LegacyOptions<\"async\">\n  | ((\n      content: string | Buffer,\n      loaderContext: LoaderContext,\n      meta: any\n    ) => import(\"sass\").LegacyOptions<\"async\">);\n```\n\nDefault: defaults values for Sass implementation\n\nOptions for [Dart Sass](http://sass-lang.com/dart-sass) or [Node Sass](https://github.com/sass/node-sass) implementation.\n\n> ℹ️ The `charset` option has `true` value by default for `dart-sass`, we strongly discourage change value to `false`, because webpack doesn't support files other than `utf-8`.\n\n> ℹ️ The `indentedSyntax` option has `true` value for the `sass` extension.\n\n> ℹ️ Options such as `data` and `file` are unavailable and will be ignored.\n\n> ℹ We strongly discourage change `outFile`, `sourceMapContents`, `sourceMapEmbed`, `sourceMapRoot` options because `sass-loader` automatically sets these options when the `sourceMap` option is `true`.\n\n> ℹ️ Access to the [loader context](https://webpack.js.org/api/loaders/#the-loader-context) inside the custom importer can be done using the `this.webpackLoaderContext` property.\n\nThere is a slight difference between the `sass` (`dart-sass`) and `node-sass` options.\n\nPlease consult documentation before using them:\n\n- [Dart Sass documentation](https://github.com/sass/dart-sass#javascript-api) for all available `sass` options.\n- [Node Sass documentation](https://github.com/sass/node-sass/#options) for all available `node-sass` options.\n\n#### `object`\n\nUse an object for the Sass implementation setup.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              sassOptions: {\n                indentWidth: 4,\n                includePaths: [\"absolute/path/a\", \"absolute/path/b\"],\n              },\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n#### `function`\n\nAllows to setup the Sass implementation by setting different options based on the loader context.\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              sassOptions: (loaderContext) => {\n                // More information about available properties https://webpack.js.org/api/loaders/\n                const { resourcePath, rootContext } = loaderContext;\n                const relativePath = path.relative(rootContext, resourcePath);\n\n                if (relativePath === \"styles/foo.scss\") {\n                  return {\n                    includePaths: [\"absolute/path/c\", \"absolute/path/d\"],\n                  };\n                }\n\n                return {\n                  includePaths: [\"absolute/path/a\", \"absolute/path/b\"],\n                };\n              },\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n### `sourceMap`\n\nType:\n\n```ts\ntype sourceMap = boolean;\n```\n\nDefault: depends on the `compiler.devtool` value\n\nEnables/Disables generation of source maps.\n\nBy default generation of source maps depends on the [`devtool`](https://webpack.js.org/configuration/devtool/) option.\nAll values enable source map generation except `eval` and `false` value.\n\n> ℹ If a `true` the `sourceMap`, `sourceMapRoot`, `sourceMapEmbed`, `sourceMapContents` and `omitSourceMapUrl` from `sassOptions` will be ignored.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          {\n            loader: \"css-loader\",\n            options: {\n              sourceMap: true,\n            },\n          },\n          {\n            loader: \"sass-loader\",\n            options: {\n              sourceMap: true,\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n> ℹ In some rare cases `node-sass` can output invalid source maps (it is a `node-sass` bug).\n\n> > In order to avoid this, you can try to update `node-sass` to latest version or you can try to set within `sassOptions` the `outputStyle` option to `compressed`.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              sourceMap: true,\n              sassOptions: {\n                outputStyle: \"compressed\",\n              },\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n### `additionalData`\n\nType:\n\n```ts\ntype additionalData =\n  | string\n  | ((content: string | Buffer, loaderContext: LoaderContext) => string);\n```\n\nDefault: `undefined`\n\nPrepends `Sass`/`SCSS` code before the actual entry file.\nIn this case, the `sass-loader` will not override the `data` option but just **prepend** the entry's content.\n\nThis is especially useful when some of your Sass variables depend on the environment:\n\n#### `string`\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              additionalData: \"$env: \" + process.env.NODE_ENV + \";\",\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n#### `function`\n\n##### Sync\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              additionalData: (content, loaderContext) => {\n                // More information about available properties https://webpack.js.org/api/loaders/\n                const { resourcePath, rootContext } = loaderContext;\n                const relativePath = path.relative(rootContext, resourcePath);\n\n                if (relativePath === \"styles/foo.scss\") {\n                  return \"$value: 100px;\" + content;\n                }\n\n                return \"$value: 200px;\" + content;\n              },\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n##### Async\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              additionalData: async (content, loaderContext) => {\n                // More information about available properties https://webpack.js.org/api/loaders/\n                const { resourcePath, rootContext } = loaderContext;\n                const relativePath = path.relative(rootContext, resourcePath);\n\n                if (relativePath === \"styles/foo.scss\") {\n                  return \"$value: 100px;\" + content;\n                }\n\n                return \"$value: 200px;\" + content;\n              },\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n### `webpackImporter`\n\nType:\n\n```ts\ntype webpackImporter = boolean;\n```\n\nDefault: `true`\n\nEnables/Disables the default Webpack importer.\n\nThis can improve performance in some cases. Use it with caution because aliases and `@import` at-rules starting with `~` will not work.\nYou can pass own `importer` to solve this (see [`importer docs`](https://github.com/sass/node-sass#importer--v200---experimental)).\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              webpackImporter: false,\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n### `warnRuleAsWarning`\n\nType:\n\n```ts\ntype warnRuleAsWarning = boolean;\n```\n\nDefault: `false`\n\nTreats the `@warn` rule as a webpack warning.\n\n> ℹ️ It will be `true` by default in the next major release.\n\n**style.scss**\n\n```scss\n$known-prefixes: webkit, moz, ms, o;\n\n@mixin prefix($property, $value, $prefixes) {\n  @each $prefix in $prefixes {\n    @if not index($known-prefixes, $prefix) {\n      @warn \"Unknown prefix #{$prefix}.\";\n    }\n\n    -#{$prefix}-#{$property}: $value;\n  }\n  #{$property}: $value;\n}\n\n.tilt {\n  // Oops, we typo'd \"webkit\" as \"wekbit\"!\n  @include prefix(transform, rotate(15deg), wekbit ms);\n}\n```\n\nThe presented code will throw webpack warning instead logging.\n\nTo ignore unnecessary warnings you can use the [ignoreWarnings](https://webpack.js.org/configuration/other-options/#ignorewarnings) option.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              warnRuleAsWarning: true,\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n### `api`\n\nType:\n\n```ts\ntype api = \"legacy\" | \"modern\";\n```\n\nDefault: `\"legacy\"`\n\nAllows you to switch between `legacy` and `modern` API. You can find more information [here](https://sass-lang.com/documentation/js-api).\n\n> ⚠ \"modern\" API is experimental, so some features may not work (known: built-in `importer` is not working and files with errors is not watching on initial run), you can follow this [here](https://github.com/webpack-contrib/sass-loader/issues/774).\n\n> ⚠ The sass options are different for `modern` and `old` APIs. Please look at [docs](https://sass-lang.com/documentation/js-api) how to migrate on new options.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          \"css-loader\",\n          {\n            loader: \"sass-loader\",\n            options: {\n              api: \"modern\",\n              sassOptions: {\n                // Your sass options\n              },\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\n## Examples\n\n### Extracts CSS into separate files\n\nFor production builds it's recommended to extract the CSS from your bundle being able to use parallel loading of CSS/JS resources later on.\n\nThere are two possibilities to extract a style sheet from the bundle:\n\n- [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin)\n- [extract-loader](https://github.com/peerigon/extract-loader) (simpler, but specialized on the css-loader's output)\n\n**webpack.config.js**\n\n```js\nconst MiniCssExtractPlugin = require(\"mini-css-extract-plugin\");\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          // fallback to style-loader in development\n          process.env.NODE_ENV !== \"production\"\n            ? \"style-loader\"\n            : MiniCssExtractPlugin.loader,\n          \"css-loader\",\n          \"sass-loader\",\n        ],\n      },\n    ],\n  },\n  plugins: [\n    new MiniCssExtractPlugin({\n      // Options similar to the same options in webpackOptions.output\n      // both options are optional\n      filename: \"[name].css\",\n      chunkFilename: \"[id].css\",\n    }),\n  ],\n};\n```\n\n### Source maps\n\nEnables/Disables generation of source maps.\n\nTo enable CSS source maps, you'll need to pass the `sourceMap` option to the `sass-loader` _and_ the css-loader.\n\n**webpack.config.js**\n\n```javascript\nmodule.exports = {\n  devtool: \"source-map\", // any \"source-map\"-like devtool is possible\n  module: {\n    rules: [\n      {\n        test: /\\.s[ac]ss$/i,\n        use: [\n          \"style-loader\",\n          {\n            loader: \"css-loader\",\n            options: {\n              sourceMap: true,\n            },\n          },\n          {\n            loader: \"sass-loader\",\n            options: {\n              sourceMap: true,\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n```\n\nIf you want to edit the original Sass files inside Chrome, [there's a good blog post](https://medium.com/@toolmantim/getting-started-with-css-sourcemaps-and-in-browser-sass-editing-b4daab987fb0). Checkout [test/sourceMap](https://github.com/webpack-contrib/sass-loader/tree/master/test) for a running example.\n\n## Contributing\n\nPlease take a moment to read our contributing guidelines if you haven't yet done so.\n\n[CONTRIBUTING](./.github/CONTRIBUTING.md)\n\n## License\n\n[MIT](./LICENSE)\n\n[npm]: https://img.shields.io/npm/v/sass-loader.svg\n[npm-url]: https://npmjs.com/package/sass-loader\n[node]: https://img.shields.io/node/v/sass-loader.svg\n[node-url]: https://nodejs.org\n[deps]: https://david-dm.org/webpack-contrib/sass-loader.svg\n[deps-url]: https://david-dm.org/webpack-contrib/sass-loader\n[tests]: https://github.com/webpack-contrib/sass-loader/workflows/sass-loader/badge.svg\n[tests-url]: https://github.com/webpack-contrib/sass-loader/actions\n[cover]: https://codecov.io/gh/webpack-contrib/sass-loader/branch/master/graph/badge.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/sass-loader\n[chat]: https://badges.gitter.im/webpack/webpack.svg\n[chat-url]: https://gitter.im/webpack/webpack\n[size]: https://packagephobia.now.sh/badge?p=sass-loader\n[size-url]: https://packagephobia.now.sh/result?p=sass-loader\n",
    "licenseText": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
  },
  "artifacts": [],
  "remote": {
    "resolved": "https://registry.yarnpkg.com/sass-loader/-/sass-loader-12.6.0.tgz#5148362c8e2cdd4b950f3c63ac5d16dbfed37bcb",
    "type": "tarball",
    "reference": "https://registry.yarnpkg.com/sass-loader/-/sass-loader-12.6.0.tgz",
    "hash": "5148362c8e2cdd4b950f3c63ac5d16dbfed37bcb",
    "integrity": "sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==",
    "registry": "npm",
    "packageName": "sass-loader",
    "cacheIntegrity": "sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA== sha1-UUg2LI4s3UuVDzxjrF0W2/7Te8s="
  },
  "registry": "npm",
  "hash": "5148362c8e2cdd4b950f3c63ac5d16dbfed37bcb"
}