Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 119 additions & 50 deletions README.md

Large diffs are not rendered by default.

96 changes: 96 additions & 0 deletions test/__snapshots__/loader.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11877,3 +11877,99 @@ exports[`loader > should work with the \"webpack\" export field ('sass-embedded'
exports[`loader > should work with the \"webpack\" export field ('sass-embedded', 'modern-compiler' API, 'scss' syntax) 3`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern' API, 'sass' syntax) 1`] = `
"@charset \\"UTF-8\\";\\n/*!***************************!*\\\\\\n !*** css ./sass/file.css ***!\\n \\\\***************************/\\n.color-red {\\n color: red;\\n}\\n/*!********************************!*\\\\\\n !*** css ./sass/language.sass ***!\\n \\\\********************************/\\n\\nbody {\\n font: 100% Helvetica, sans-serif;\\n color: #333;\\n}\\n\\nnav ul {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\nnav li {\\n display: inline-block;\\n}\\nnav a {\\n display: block;\\n padding: 6px 12px;\\n text-decoration: none;\\n}\\n\\n.box {\\n -webkit-border-radius: 10px;\\n -moz-border-radius: 10px;\\n -ms-border-radius: 10px;\\n border-radius: 10px;\\n}\\n\\n.message, .warning, .error, .success {\\n border: 1px solid #ccc;\\n padding: 10px;\\n color: #333;\\n}\\n\\n.success {\\n border-color: green;\\n}\\n\\n.error {\\n border-color: red;\\n}\\n\\n.warning {\\n border-color: yellow;\\n}\\n\\n.foo:before {\\n content: \\"\\\\e0c6\\";\\n}\\n\\n.bar:before {\\n content: \\"∑\\";\\n}\\n"
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern' API, 'sass' syntax) 2`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern' API, 'sass' syntax) 3`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern' API, 'scss' syntax) 1`] = `
"@charset \\"UTF-8\\";\\n/*!***************************!*\\\\\\n !*** css ./scss/file.css ***!\\n \\\\***************************/\\n.color-red {\\n color: red;\\n}\\n/*!********************************!*\\\\\\n !*** css ./scss/language.scss ***!\\n \\\\********************************/\\n\\nbody {\\n font: 100% Helvetica, sans-serif;\\n color: #333;\\n}\\n\\nnav ul {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\nnav li {\\n display: inline-block;\\n}\\nnav a {\\n display: block;\\n padding: 6px 12px;\\n text-decoration: none;\\n}\\n\\n.box {\\n -webkit-border-radius: 10px;\\n -moz-border-radius: 10px;\\n -ms-border-radius: 10px;\\n border-radius: 10px;\\n}\\n\\n.foo:before {\\n content: \\"\\\\e0c6\\";\\n}\\n\\n.bar:before {\\n content: \\"∑\\";\\n}\\n"
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern' API, 'scss' syntax) 2`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern' API, 'scss' syntax) 3`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern-compiler' API, 'sass' syntax) 1`] = `
"@charset \\"UTF-8\\";\\n/*!***************************!*\\\\\\n !*** css ./sass/file.css ***!\\n \\\\***************************/\\n.color-red {\\n color: red;\\n}\\n/*!********************************!*\\\\\\n !*** css ./sass/language.sass ***!\\n \\\\********************************/\\n\\nbody {\\n font: 100% Helvetica, sans-serif;\\n color: #333;\\n}\\n\\nnav ul {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\nnav li {\\n display: inline-block;\\n}\\nnav a {\\n display: block;\\n padding: 6px 12px;\\n text-decoration: none;\\n}\\n\\n.box {\\n -webkit-border-radius: 10px;\\n -moz-border-radius: 10px;\\n -ms-border-radius: 10px;\\n border-radius: 10px;\\n}\\n\\n.message, .warning, .error, .success {\\n border: 1px solid #ccc;\\n padding: 10px;\\n color: #333;\\n}\\n\\n.success {\\n border-color: green;\\n}\\n\\n.error {\\n border-color: red;\\n}\\n\\n.warning {\\n border-color: yellow;\\n}\\n\\n.foo:before {\\n content: \\"\\\\e0c6\\";\\n}\\n\\n.bar:before {\\n content: \\"∑\\";\\n}\\n"
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern-compiler' API, 'sass' syntax) 2`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern-compiler' API, 'sass' syntax) 3`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern-compiler' API, 'scss' syntax) 1`] = `
"@charset \\"UTF-8\\";\\n/*!***************************!*\\\\\\n !*** css ./scss/file.css ***!\\n \\\\***************************/\\n.color-red {\\n color: red;\\n}\\n/*!********************************!*\\\\\\n !*** css ./scss/language.scss ***!\\n \\\\********************************/\\n\\nbody {\\n font: 100% Helvetica, sans-serif;\\n color: #333;\\n}\\n\\nnav ul {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\nnav li {\\n display: inline-block;\\n}\\nnav a {\\n display: block;\\n padding: 6px 12px;\\n text-decoration: none;\\n}\\n\\n.box {\\n -webkit-border-radius: 10px;\\n -moz-border-radius: 10px;\\n -ms-border-radius: 10px;\\n border-radius: 10px;\\n}\\n\\n.foo:before {\\n content: \\"\\\\e0c6\\";\\n}\\n\\n.bar:before {\\n content: \\"∑\\";\\n}\\n"
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern-compiler' API, 'scss' syntax) 2`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('dart-sass', 'modern-compiler' API, 'scss' syntax) 3`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern' API, 'sass' syntax) 1`] = `
"@charset \\"UTF-8\\";\\n/*!***************************!*\\\\\\n !*** css ./sass/file.css ***!\\n \\\\***************************/\\n.color-red {\\n color: red;\\n}\\n/*!********************************!*\\\\\\n !*** css ./sass/language.sass ***!\\n \\\\********************************/\\n\\nbody {\\n font: 100% Helvetica, sans-serif;\\n color: #333;\\n}\\n\\nnav ul {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\nnav li {\\n display: inline-block;\\n}\\nnav a {\\n display: block;\\n padding: 6px 12px;\\n text-decoration: none;\\n}\\n\\n.box {\\n -webkit-border-radius: 10px;\\n -moz-border-radius: 10px;\\n -ms-border-radius: 10px;\\n border-radius: 10px;\\n}\\n\\n.message, .warning, .error, .success {\\n border: 1px solid #ccc;\\n padding: 10px;\\n color: #333;\\n}\\n\\n.success {\\n border-color: green;\\n}\\n\\n.error {\\n border-color: red;\\n}\\n\\n.warning {\\n border-color: yellow;\\n}\\n\\n.foo:before {\\n content: \\"\\\\e0c6\\";\\n}\\n\\n.bar:before {\\n content: \\"∑\\";\\n}\\n"
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern' API, 'sass' syntax) 2`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern' API, 'sass' syntax) 3`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern' API, 'scss' syntax) 1`] = `
"@charset \\"UTF-8\\";\\n/*!***************************!*\\\\\\n !*** css ./scss/file.css ***!\\n \\\\***************************/\\n.color-red {\\n color: red;\\n}\\n/*!********************************!*\\\\\\n !*** css ./scss/language.scss ***!\\n \\\\********************************/\\n\\nbody {\\n font: 100% Helvetica, sans-serif;\\n color: #333;\\n}\\n\\nnav ul {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\nnav li {\\n display: inline-block;\\n}\\nnav a {\\n display: block;\\n padding: 6px 12px;\\n text-decoration: none;\\n}\\n\\n.box {\\n -webkit-border-radius: 10px;\\n -moz-border-radius: 10px;\\n -ms-border-radius: 10px;\\n border-radius: 10px;\\n}\\n\\n.foo:before {\\n content: \\"\\\\e0c6\\";\\n}\\n\\n.bar:before {\\n content: \\"∑\\";\\n}\\n"
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern' API, 'scss' syntax) 2`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern' API, 'scss' syntax) 3`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern-compiler' API, 'sass' syntax) 1`] = `
"@charset \\"UTF-8\\";\\n/*!***************************!*\\\\\\n !*** css ./sass/file.css ***!\\n \\\\***************************/\\n.color-red {\\n color: red;\\n}\\n/*!********************************!*\\\\\\n !*** css ./sass/language.sass ***!\\n \\\\********************************/\\n\\nbody {\\n font: 100% Helvetica, sans-serif;\\n color: #333;\\n}\\n\\nnav ul {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\nnav li {\\n display: inline-block;\\n}\\nnav a {\\n display: block;\\n padding: 6px 12px;\\n text-decoration: none;\\n}\\n\\n.box {\\n -webkit-border-radius: 10px;\\n -moz-border-radius: 10px;\\n -ms-border-radius: 10px;\\n border-radius: 10px;\\n}\\n\\n.message, .warning, .error, .success {\\n border: 1px solid #ccc;\\n padding: 10px;\\n color: #333;\\n}\\n\\n.success {\\n border-color: green;\\n}\\n\\n.error {\\n border-color: red;\\n}\\n\\n.warning {\\n border-color: yellow;\\n}\\n\\n.foo:before {\\n content: \\"\\\\e0c6\\";\\n}\\n\\n.bar:before {\\n content: \\"∑\\";\\n}\\n"
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern-compiler' API, 'sass' syntax) 2`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern-compiler' API, 'sass' syntax) 3`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern-compiler' API, 'scss' syntax) 1`] = `
"@charset \\"UTF-8\\";\\n/*!***************************!*\\\\\\n !*** css ./scss/file.css ***!\\n \\\\***************************/\\n.color-red {\\n color: red;\\n}\\n/*!********************************!*\\\\\\n !*** css ./scss/language.scss ***!\\n \\\\********************************/\\n\\nbody {\\n font: 100% Helvetica, sans-serif;\\n color: #333;\\n}\\n\\nnav ul {\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n}\\nnav li {\\n display: inline-block;\\n}\\nnav a {\\n display: block;\\n padding: 6px 12px;\\n text-decoration: none;\\n}\\n\\n.box {\\n -webkit-border-radius: 10px;\\n -moz-border-radius: 10px;\\n -ms-border-radius: 10px;\\n border-radius: 10px;\\n}\\n\\n.foo:before {\\n content: \\"\\\\e0c6\\";\\n}\\n\\n.bar:before {\\n content: \\"∑\\";\\n}\\n"
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern-compiler' API, 'scss' syntax) 2`] = `
[]
`;

exports[`loader > should work with the built-in CSS support of webpack ('sass-embedded', 'modern-compiler' API, 'scss' syntax) 3`] = `
[]
`;
Loading
Loading