diff --git a/README.md b/README.md index dfd2ee6f..77b6fe35 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ This allows you to control the versions of all your dependencies and to choose w > > [Node Sass](https://github.com/sass/node-sass) does not work with [Yarn PnP](https://classic.yarnpkg.com/en/docs/pnp/) and doesn't support [@use rule](https://sass-lang.com/documentation/at-rules/use). -Chain 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 with the [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to extract it into a separate file. +Chain the `sass-loader` with the [css-loader](https://github.com/webpack/css-loader) and the [style-loader](https://github.com/webpack/style-loader) to immediately apply all styles to the DOM, or with the [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to extract it into a separate file. Then add the loader to your webpack configuration. For example: @@ -887,7 +887,7 @@ module.exports = { ``` If 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/main/test) for a working example. +Checkout [test/sourceMap](https://github.com/webpack/sass-loader/tree/main/test) for a working example. ## Contributing @@ -904,10 +904,10 @@ If you're new here, please take a moment to review our contributing guidelines b [npm-url]: https://npmjs.com/package/sass-loader [node]: https://img.shields.io/node/v/sass-loader.svg [node-url]: https://nodejs.org -[tests]: https://github.com/webpack-contrib/sass-loader/workflows/sass-loader/badge.svg -[tests-url]: https://github.com/webpack-contrib/sass-loader/actions -[cover]: https://codecov.io/gh/webpack-contrib/sass-loader/branch/main/graph/badge.svg -[cover-url]: https://codecov.io/gh/webpack-contrib/sass-loader +[tests]: https://github.com/webpack/sass-loader/workflows/sass-loader/badge.svg +[tests-url]: https://github.com/webpack/sass-loader/actions +[cover]: https://codecov.io/gh/webpack/sass-loader/branch/main/graph/badge.svg +[cover-url]: https://codecov.io/gh/webpack/sass-loader [discussion]: https://img.shields.io/github/discussions/webpack/webpack [discussion-url]: https://github.com/webpack/webpack/discussions [size]: https://packagephobia.now.sh/badge?p=sass-loader diff --git a/package.json b/package.json index 653bb8ab..3678cb31 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ "webpack", "loader" ], - "homepage": "https://github.com/webpack-contrib/sass-loader", - "bugs": "https://github.com/webpack-contrib/sass-loader/issues", - "repository": "webpack-contrib/sass-loader", + "homepage": "https://github.com/webpack/sass-loader", + "bugs": "https://github.com/webpack/sass-loader/issues", + "repository": "webpack/sass-loader", "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" diff --git a/src/options.json b/src/options.json index ef919b4a..c8cc5f64 100644 --- a/src/options.json +++ b/src/options.json @@ -4,7 +4,7 @@ "properties": { "implementation": { "description": "The implementation of the sass to be used.", - "link": "https://github.com/webpack-contrib/sass-loader#implementation", + "link": "https://github.com/webpack/sass-loader#implementation", "anyOf": [ { "type": "string" @@ -16,12 +16,12 @@ }, "api": { "description": "Switch between old and modern API for `sass` (`Dart Sass`) and `Sass Embedded` implementations.", - "link": "https://github.com/webpack-contrib/sass-loader#sassoptions", + "link": "https://github.com/webpack/sass-loader#sassoptions", "enum": ["legacy", "modern", "modern-compiler"] }, "sassOptions": { "description": "Options for `node-sass` or `sass` (`Dart Sass`) implementation.", - "link": "https://github.com/webpack-contrib/sass-loader#sassoptions", + "link": "https://github.com/webpack/sass-loader#sassoptions", "anyOf": [ { "type": "object", @@ -34,7 +34,7 @@ }, "additionalData": { "description": "Prepends/Appends `Sass`/`SCSS` code before the actual entry file.", - "link": "https://github.com/webpack-contrib/sass-loader#additionaldata", + "link": "https://github.com/webpack/sass-loader#additionaldata", "anyOf": [ { "type": "string" @@ -46,17 +46,17 @@ }, "sourceMap": { "description": "Enables/Disables generation of source maps.", - "link": "https://github.com/webpack-contrib/sass-loader#sourcemap", + "link": "https://github.com/webpack/sass-loader#sourcemap", "type": "boolean" }, "webpackImporter": { "description": "Enables/Disables default `webpack` importer.", - "link": "https://github.com/webpack-contrib/sass-loader#webpackimporter", + "link": "https://github.com/webpack/sass-loader#webpackimporter", "type": "boolean" }, "warnRuleAsWarning": { "description": "Treats the '@warn' rule as a webpack warning.", - "link": "https://github.com/webpack-contrib/sass-loader#warnruleaswarning", + "link": "https://github.com/webpack/sass-loader#warnruleaswarning", "type": "boolean" } }, diff --git a/src/utils.js b/src/utils.js index f5f70d13..8650e45f 100644 --- a/src/utils.js +++ b/src/utils.js @@ -370,7 +370,7 @@ function getPossibleRequests( } // Keep in mind: ext can also be something like '.datepicker' when the true extension is omitted and the filename contains a dot. - // @see https://github.com/webpack-contrib/sass-loader/issues/167 + // @see https://github.com/webpack/sass/issues/167 const extension = path.extname(request).toLowerCase(); // Because @import is also defined in CSS, Sass needs a way of compiling plain CSS @imports without trying to import the files at compile time. @@ -893,7 +893,7 @@ function normalizeSourceMap(map, rootContext) { // node-sass returns POSIX paths, that's why we need to transform them back to native paths. // This fixes an error on windows where the source-map module cannot resolve the source maps. - // @see https://github.com/webpack-contrib/sass-loader/issues/366#issuecomment-279460722 + // @see https://github.com/webpack/sass-loader/issues/366#issuecomment-279460722 newMap.sources = newMap.sources.map((source) => { const sourceType = getURLType(source); diff --git a/test/__snapshots__/validate-options.test.js.no-node-sass.snap b/test/__snapshots__/validate-options.test.js.no-node-sass.snap index 2ea4f129..43af6eea 100644 --- a/test/__snapshots__/validate-options.test.js.no-node-sass.snap +++ b/test/__snapshots__/validate-options.test.js.no-node-sass.snap @@ -5,7 +5,7 @@ exports[`validate options should throw an error on the "additionalData" option w - options.additionalData should be one of these: string | function -> Prepends/Appends \`Sass\`/\`SCSS\` code before the actual entry file. - -> Read more at https://github.com/webpack-contrib/sass-loader#additionaldata + -> Read more at https://github.com/webpack/sass-loader#additionaldata Details: * options.additionalData should be a string. * options.additionalData should be an instance of function." @@ -16,7 +16,7 @@ exports[`validate options should throw an error on the "api" option with "string - options.api should be one of these: "legacy" | "modern" | "modern-compiler" -> Switch between old and modern API for \`sass\` (\`Dart Sass\`) and \`Sass Embedded\` implementations. - -> Read more at https://github.com/webpack-contrib/sass-loader#sassoptions" + -> Read more at https://github.com/webpack/sass-loader#sassoptions" `; exports[`validate options should throw an error on the "api" option with "true" value 1`] = ` @@ -24,7 +24,7 @@ exports[`validate options should throw an error on the "api" option with "true" - options.api should be one of these: "legacy" | "modern" | "modern-compiler" -> Switch between old and modern API for \`sass\` (\`Dart Sass\`) and \`Sass Embedded\` implementations. - -> Read more at https://github.com/webpack-contrib/sass-loader#sassoptions" + -> Read more at https://github.com/webpack/sass-loader#sassoptions" `; exports[`validate options should throw an error on the "implementation" option with "() => {}" value 1`] = ` @@ -32,7 +32,7 @@ exports[`validate options should throw an error on the "implementation" option w - options.implementation should be one of these: string | object { … } -> The implementation of the sass to be used. - -> Read more at https://github.com/webpack-contrib/sass-loader#implementation + -> Read more at https://github.com/webpack/sass-loader#implementation Details: * options.implementation should be a string. * options.implementation should be an object: @@ -44,7 +44,7 @@ exports[`validate options should throw an error on the "implementation" option w - options.implementation should be one of these: string | object { … } -> The implementation of the sass to be used. - -> Read more at https://github.com/webpack-contrib/sass-loader#implementation + -> Read more at https://github.com/webpack/sass-loader#implementation Details: * options.implementation should be a string. * options.implementation should be an object: @@ -56,7 +56,7 @@ exports[`validate options should throw an error on the "sassOptions" option with - options.sassOptions should be one of these: object { … } | function -> Options for \`node-sass\` or \`sass\` (\`Dart Sass\`) implementation. - -> Read more at https://github.com/webpack-contrib/sass-loader#sassoptions + -> Read more at https://github.com/webpack/sass-loader#sassoptions Details: * options.sassOptions should be an object: object { … } @@ -68,7 +68,7 @@ exports[`validate options should throw an error on the "sassOptions" option with - options.sassOptions should be one of these: object { … } | function -> Options for \`node-sass\` or \`sass\` (\`Dart Sass\`) implementation. - -> Read more at https://github.com/webpack-contrib/sass-loader#sassoptions + -> Read more at https://github.com/webpack/sass-loader#sassoptions Details: * options.sassOptions should be an object: object { … } @@ -79,7 +79,7 @@ exports[`validate options should throw an error on the "sourceMap" option with " "Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema. - options.sourceMap should be a boolean. -> Enables/Disables generation of source maps. - -> Read more at https://github.com/webpack-contrib/sass-loader#sourcemap" + -> Read more at https://github.com/webpack/sass-loader#sourcemap" `; exports[`validate options should throw an error on the "unknown" option with "/test/" value 1`] = ` @@ -134,12 +134,12 @@ exports[`validate options should throw an error on the "warnRuleAsWarning" optio "Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema. - options.warnRuleAsWarning should be a boolean. -> Treats the '@warn' rule as a webpack warning. - -> Read more at https://github.com/webpack-contrib/sass-loader#warnruleaswarning" + -> Read more at https://github.com/webpack/sass-loader#warnruleaswarning" `; exports[`validate options should throw an error on the "webpackImporter" option with "string" value 1`] = ` "Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema. - options.webpackImporter should be a boolean. -> Enables/Disables default \`webpack\` importer. - -> Read more at https://github.com/webpack-contrib/sass-loader#webpackimporter" + -> Read more at https://github.com/webpack/sass-loader#webpackimporter" `; diff --git a/test/__snapshots__/validate-options.test.js.snap b/test/__snapshots__/validate-options.test.js.snap index 2ea4f129..43af6eea 100644 --- a/test/__snapshots__/validate-options.test.js.snap +++ b/test/__snapshots__/validate-options.test.js.snap @@ -5,7 +5,7 @@ exports[`validate options should throw an error on the "additionalData" option w - options.additionalData should be one of these: string | function -> Prepends/Appends \`Sass\`/\`SCSS\` code before the actual entry file. - -> Read more at https://github.com/webpack-contrib/sass-loader#additionaldata + -> Read more at https://github.com/webpack/sass-loader#additionaldata Details: * options.additionalData should be a string. * options.additionalData should be an instance of function." @@ -16,7 +16,7 @@ exports[`validate options should throw an error on the "api" option with "string - options.api should be one of these: "legacy" | "modern" | "modern-compiler" -> Switch between old and modern API for \`sass\` (\`Dart Sass\`) and \`Sass Embedded\` implementations. - -> Read more at https://github.com/webpack-contrib/sass-loader#sassoptions" + -> Read more at https://github.com/webpack/sass-loader#sassoptions" `; exports[`validate options should throw an error on the "api" option with "true" value 1`] = ` @@ -24,7 +24,7 @@ exports[`validate options should throw an error on the "api" option with "true" - options.api should be one of these: "legacy" | "modern" | "modern-compiler" -> Switch between old and modern API for \`sass\` (\`Dart Sass\`) and \`Sass Embedded\` implementations. - -> Read more at https://github.com/webpack-contrib/sass-loader#sassoptions" + -> Read more at https://github.com/webpack/sass-loader#sassoptions" `; exports[`validate options should throw an error on the "implementation" option with "() => {}" value 1`] = ` @@ -32,7 +32,7 @@ exports[`validate options should throw an error on the "implementation" option w - options.implementation should be one of these: string | object { … } -> The implementation of the sass to be used. - -> Read more at https://github.com/webpack-contrib/sass-loader#implementation + -> Read more at https://github.com/webpack/sass-loader#implementation Details: * options.implementation should be a string. * options.implementation should be an object: @@ -44,7 +44,7 @@ exports[`validate options should throw an error on the "implementation" option w - options.implementation should be one of these: string | object { … } -> The implementation of the sass to be used. - -> Read more at https://github.com/webpack-contrib/sass-loader#implementation + -> Read more at https://github.com/webpack/sass-loader#implementation Details: * options.implementation should be a string. * options.implementation should be an object: @@ -56,7 +56,7 @@ exports[`validate options should throw an error on the "sassOptions" option with - options.sassOptions should be one of these: object { … } | function -> Options for \`node-sass\` or \`sass\` (\`Dart Sass\`) implementation. - -> Read more at https://github.com/webpack-contrib/sass-loader#sassoptions + -> Read more at https://github.com/webpack/sass-loader#sassoptions Details: * options.sassOptions should be an object: object { … } @@ -68,7 +68,7 @@ exports[`validate options should throw an error on the "sassOptions" option with - options.sassOptions should be one of these: object { … } | function -> Options for \`node-sass\` or \`sass\` (\`Dart Sass\`) implementation. - -> Read more at https://github.com/webpack-contrib/sass-loader#sassoptions + -> Read more at https://github.com/webpack/sass-loader#sassoptions Details: * options.sassOptions should be an object: object { … } @@ -79,7 +79,7 @@ exports[`validate options should throw an error on the "sourceMap" option with " "Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema. - options.sourceMap should be a boolean. -> Enables/Disables generation of source maps. - -> Read more at https://github.com/webpack-contrib/sass-loader#sourcemap" + -> Read more at https://github.com/webpack/sass-loader#sourcemap" `; exports[`validate options should throw an error on the "unknown" option with "/test/" value 1`] = ` @@ -134,12 +134,12 @@ exports[`validate options should throw an error on the "warnRuleAsWarning" optio "Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema. - options.warnRuleAsWarning should be a boolean. -> Treats the '@warn' rule as a webpack warning. - -> Read more at https://github.com/webpack-contrib/sass-loader#warnruleaswarning" + -> Read more at https://github.com/webpack/sass-loader#warnruleaswarning" `; exports[`validate options should throw an error on the "webpackImporter" option with "string" value 1`] = ` "Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema. - options.webpackImporter should be a boolean. -> Enables/Disables default \`webpack\` importer. - -> Read more at https://github.com/webpack-contrib/sass-loader#webpackimporter" + -> Read more at https://github.com/webpack/sass-loader#webpackimporter" `; diff --git a/test/loader.test.js b/test/loader.test.js index 76e20aad..7b8f6af7 100644 --- a/test/loader.test.js +++ b/test/loader.test.js @@ -266,7 +266,7 @@ describe("loader", () => { await close(compiler); }); - // Test for issue: https://github.com/webpack-contrib/sass-loader/issues/32 + // Test for issue: https://github.com/webpack/sass-loader/issues/32 it(`should work with multiple "@import" at-rules ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { const testId = getTestId("multiple-imports", syntax); const options = { @@ -286,7 +286,7 @@ describe("loader", () => { await close(compiler); }); - // Test for issue: https://github.com/webpack-contrib/sass-loader/issues/73 + // Test for issue: https://github.com/webpack/sass-loader/issues/73 it(`should work with "@import" at-rules from other language style ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { const testId = getTestId("import-other-style", syntax); const options = { @@ -708,7 +708,7 @@ describe("loader", () => { }); // Legacy support for CSS imports with node-sass - // See discussion https://github.com/webpack-contrib/sass-loader/pull/573/files?#r199109203 + // See discussion https://github.com/webpack/sass-loader/pull/573/files?#r199109203 it(`should work and ignore all css "@import" at-rules ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { const testId = getTestId("import-css", syntax); const options = { diff --git a/test/sass/imports.sass b/test/sass/imports.sass index 11dea9cf..6011ec20 100644 --- a/test/sass/imports.sass +++ b/test/sass/imports.sass @@ -7,7 +7,7 @@ /* @import ~sass/underscore */ @import ~sass/underscore // Import a module with a dot in its name -// @see https://github.com/webpack-contrib/sass-loader/issues/167 +// @see https://github.com/webpack/sass-loader/issues/167 /* @import ~sass/some.module */ @import ~sass/some.module /* @import url(http://example.com/something/from/the/interwebs); */ @@ -17,7 +17,7 @@ @import language // The local util file should take precedence over Node's util module -// See https://github.com/webpack-contrib/sass-loader/issues/556 +// See https://github.com/webpack/sass-loader/issues/556 /* @import util */ @import util /* @import ~module */ diff --git a/test/sass/uses.sass b/test/sass/uses.sass index 2ab573c1..6cdd3556 100644 --- a/test/sass/uses.sass +++ b/test/sass/uses.sass @@ -8,11 +8,11 @@ /* @use ~sass/underscore */ @use "~sass/underscore" as underscore3 // Import a module with a dot in its name -// @see https://github.com/webpack-contrib/sass-loader/issues/167 +// @see https://github.com/webpack/sass-loader/issues/167 /* @use ~sass/some.module */ @use "~sass/some.module" // The local util file should take precedence over Node's util module -// See https://github.com/webpack-contrib/sass-loader/issues/556 +// See https://github.com/webpack/sass-loader/issues/556 /* @use util */ @use "util" /* @use ~module */ diff --git a/test/scss/another/module.js b/test/scss/another/module.js index c04a56e3..093439b3 100644 --- a/test/scss/another/module.js +++ b/test/scss/another/module.js @@ -1,4 +1,4 @@ // ./another/module.js: The sass-loader should not try to import that. scss, sass and css extensions should be preferred. -// See https://github.com/webpack-contrib/sass-loader/issues/556#issuecomment-381154009 +// See https://github.com/webpack/sass-loader/issues/556#issuecomment-381154009 "This should not be imported"; diff --git a/test/scss/imports.scss b/test/scss/imports.scss index f887ff01..ea5d113a 100644 --- a/test/scss/imports.scss +++ b/test/scss/imports.scss @@ -7,7 +7,7 @@ /* @import "~scss/underscore"; */ @import "~scss/underscore"; // Import a module with a dot in its name -// @see https://github.com/webpack-contrib/sass-loader/issues/167 +// @see https://github.com/webpack/sass-loader/issues/167 /* @import "~scss/some.module"; */ @import "~scss/some.module"; /* @import url(http://example.com/something/from/the/interwebs); */ @@ -17,7 +17,7 @@ @import "language"; } // The local util file should take precedence over Node's util module -// See https://github.com/webpack-contrib/sass-loader/issues/556 +// See https://github.com/webpack/sass-loader/issues/556 /* @import "util"; */ @import "util"; /* @import "~module"; */ diff --git a/test/scss/uses.scss b/test/scss/uses.scss index 01f9e528..66ff5295 100644 --- a/test/scss/uses.scss +++ b/test/scss/uses.scss @@ -7,11 +7,11 @@ /* @use "~scss/underscore"; */ @use "~scss/underscore" as underscore3; // Import a module with a dot in its name -// @see https://github.com/webpack-contrib/sass-loader/issues/167 +// @see https://github.com/webpack/sass-loader/issues/167 /* @use "~scss/some.module"; */ @use "~scss/some.module"; // The local util file should take precedence over Node's util module -// See https://github.com/webpack-contrib/sass-loader/issues/556 +// See https://github.com/webpack/sass-loader/issues/556 /* @use "util"; */ @use "util"; /* @use "~module"; */ diff --git a/test/scss/util.scss b/test/scss/util.scss index 61a5747f..6d98593f 100644 --- a/test/scss/util.scss +++ b/test/scss/util.scss @@ -1,5 +1,5 @@ // This file has been named "util" on purpose because in a wrong import setup it would conflict with Node's util -// See https://github.com/webpack-contrib/sass-loader/issues/556 +// See https://github.com/webpack/sass-loader/issues/556 .util { color: hotpink; } diff --git a/test/webpackImporter-options.test.js b/test/webpackImporter-options.test.js index f31a8097..78ecc478 100644 --- a/test/webpackImporter-options.test.js +++ b/test/webpackImporter-options.test.js @@ -18,7 +18,7 @@ describe("webpackImporter option", () => { for (const syntax of syntaxStyles) { const { name: implementationName, api, implementation } = item; - // TODO fix me https://github.com/webpack-contrib/sass-loader/issues/774 + // TODO fix me https://github.com/webpack/sass-loader/issues/774 if (api === "modern" || api === "modern-compiler") { continue; }