Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Experimental] Add built-in Sass support (#10133)
* Add built-in Sass support * Add copy of CSS tests for SCSS * Fix failing tests * Fix url-loader tests * Remove css file generated by tests * Fix nprogress import for css file * Fix SCSS modules (still 2 tests that need investigating) * Update documentation for Sass support * Fix plain CSS import test * Fix formatting with prettier fix * Update test output to reflect scss usage * Revert "Fix plain CSS import test" This reverts commit 380319d. # Conflicts: # test/integration/scss-modules/test/index.test.js * Update loader structure * Resolve loaders before passing to compile function * Remove dead filter code * Arrange loaders in order and push to array * Fix loader order bug * Fix global Sass loader and make module prepocessor optional * Adjust Sass Modules Implementation * Fix typo * Adjust regexps * Use regexes * Simplify global setup * Adjust comments * fix regex * Simplify identifier file * Update Sass Instructions * Remove unneeded fixtures * Adjust global tests * Remove wrapper * Update source maps * Flag scss behavior * Fix css property value * Update fixtures with Sass vars * Turn on Scss support * fix HMR test * Fix snapshots Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: Joe Haddad <timer150@gmail.com>
- Loading branch information
1 parent
7d419f8
commit 8449ebc
Showing
149 changed files
with
2,524 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/integration/css-fixtures/nm-module/node_modules/example/index.module.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
test/integration/scss-fixtures/3rd-party-module/pages/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { foo } from './index.module.scss' | ||
|
||
export default function Home() { | ||
return <div id="verify-div" className={foo} /> | ||
} |
17 changes: 17 additions & 0 deletions
17
test/integration/scss-fixtures/3rd-party-module/pages/index.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.foo { | ||
position: relative; | ||
} | ||
|
||
.foo :global(.bar), | ||
.foo :global(.baz) { | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
|
||
.foo :global(.lol) { | ||
width: 80%; | ||
} | ||
|
||
.foo > :global(.lel) { | ||
width: 80%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { redText } from './index.module.scss' | ||
|
||
export default function Home() { | ||
return ( | ||
<div id="verify-red" className={redText}> | ||
This text should be red. | ||
</div> | ||
) | ||
} |
Oops, something went wrong.