-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Support for CSS Module Value Imports (#16973)
- Loading branch information
Showing
13 changed files
with
127 additions
and
31 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
5 changes: 5 additions & 0 deletions
5
test/integration/css-features/fixtures/module-import-exports/package.json
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 @@ | ||
{ | ||
"browserslist": [ | ||
"last 1 chrome version" | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
test/integration/css-features/fixtures/module-import-exports/pages/colors.module.css
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,4 @@ | ||
:export { | ||
w1: #ffffff; | ||
b1: #000000; | ||
} |
5 changes: 5 additions & 0 deletions
5
test/integration/css-features/fixtures/module-import-exports/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 styles from './styles.module.css' | ||
|
||
export default function () { | ||
return <div>{JSON.stringify(styles)}</div> | ||
} |
5 changes: 5 additions & 0 deletions
5
test/integration/css-features/fixtures/module-import-exports/pages/styles.module.css
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 @@ | ||
@value b1 from "./colors.module.css"; | ||
|
||
.blk { | ||
color: b1; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3202,6 +3202,11 @@ | |
version "7.0.4" | ||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" | ||
|
||
"@types/json-schema@^7.0.5": | ||
version "7.0.6" | ||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" | ||
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== | ||
|
||
"@types/[email protected]": | ||
version "0.0.30" | ||
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.30.tgz#44cb52f32a809734ca562e685c6473b5754a7818" | ||
|
@@ -3805,6 +3810,11 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: | |
version "3.4.1" | ||
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" | ||
|
||
ajv-keywords@^3.5.2: | ||
version "3.5.2" | ||
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" | ||
integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== | ||
|
||
ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: | ||
version "6.12.0" | ||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" | ||
|
@@ -3814,6 +3824,16 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: | |
json-schema-traverse "^0.4.1" | ||
uri-js "^4.2.2" | ||
|
||
ajv@^6.12.4: | ||
version "6.12.4" | ||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" | ||
integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== | ||
dependencies: | ||
fast-deep-equal "^3.1.1" | ||
fast-json-stable-stringify "^2.0.0" | ||
json-schema-traverse "^0.4.1" | ||
uri-js "^4.2.2" | ||
|
||
[email protected]: | ||
version "1.4.1" | ||
resolved "https://registry.yarnpkg.com/ally.js/-/ally.js-1.4.1.tgz#9fb7e6ba58efac4ee9131cb29aa9ee3b540bcf1e" | ||
|
@@ -5945,23 +5965,23 @@ [email protected]: | |
postcss-value-parser "^3.3.0" | ||
source-list-map "^2.0.0" | ||
|
||
[email protected]: | ||
version "3.5.3" | ||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.5.3.tgz#95ac16468e1adcd95c844729e0bb167639eb0bcf" | ||
[email protected]: | ||
version "4.3.0" | ||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-4.3.0.tgz#c888af64b2a5b2e85462c72c0f4a85c7e2e0821e" | ||
integrity sha512-rdezjCjScIrsL8BSYszgT4s476IcNKt6yX69t0pHjJVnPUTDpn4WfIpDQTN3wCJvUvfsz/mFjuGOekf3PY3NUg== | ||
dependencies: | ||
camelcase "^5.3.1" | ||
camelcase "^6.0.0" | ||
cssesc "^3.0.0" | ||
icss-utils "^4.1.1" | ||
loader-utils "^1.2.3" | ||
normalize-path "^3.0.0" | ||
postcss "^7.0.27" | ||
loader-utils "^2.0.0" | ||
postcss "^7.0.32" | ||
postcss-modules-extract-imports "^2.0.0" | ||
postcss-modules-local-by-default "^3.0.2" | ||
postcss-modules-local-by-default "^3.0.3" | ||
postcss-modules-scope "^2.2.0" | ||
postcss-modules-values "^3.0.0" | ||
postcss-value-parser "^4.0.3" | ||
schema-utils "^2.6.6" | ||
semver "^6.3.0" | ||
postcss-value-parser "^4.1.0" | ||
schema-utils "^2.7.1" | ||
semver "^7.3.2" | ||
|
||
css-modules-loader-core@^1.1.0: | ||
version "1.1.0" | ||
|
@@ -13062,14 +13082,15 @@ [email protected], postcss-modules-local-by-default@^1.2.0: | |
css-selector-tokenizer "^0.7.0" | ||
postcss "^6.0.1" | ||
|
||
postcss-modules-local-by-default@^3.0.2: | ||
version "3.0.2" | ||
resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz#e8a6561be914aaf3c052876377524ca90dbb7915" | ||
postcss-modules-local-by-default@^3.0.3: | ||
version "3.0.3" | ||
resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz#bb14e0cc78279d504dbdcbfd7e0ca28993ffbbb0" | ||
integrity sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw== | ||
dependencies: | ||
icss-utils "^4.1.1" | ||
postcss "^7.0.16" | ||
postcss "^7.0.32" | ||
postcss-selector-parser "^6.0.2" | ||
postcss-value-parser "^4.0.0" | ||
postcss-value-parser "^4.1.0" | ||
|
||
[email protected], postcss-modules-scope@^1.1.0: | ||
version "1.1.0" | ||
|
@@ -13446,10 +13467,15 @@ postcss-value-parser@^3.0.0, postcss-value-parser@^3.0.1, postcss-value-parser@^ | |
version "3.3.1" | ||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" | ||
|
||
postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^4.0.3: | ||
postcss-value-parser@^4.0.2: | ||
version "4.0.3" | ||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" | ||
|
||
postcss-value-parser@^4.1.0: | ||
version "4.1.0" | ||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" | ||
integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== | ||
|
||
postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1: | ||
version "2.0.1" | ||
resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz#da8b472d901da1e205b47bdc98637b9e9e550e5f" | ||
|
@@ -13516,7 +13542,7 @@ postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.21, postcss@^6.0.23, postcss@^6.0.9 | |
source-map "^0.6.1" | ||
supports-color "^5.4.0" | ||
|
||
postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: | ||
postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.11, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.18, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0.26, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: | ||
version "7.0.27" | ||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" | ||
dependencies: | ||
|
@@ -14948,6 +14974,15 @@ schema-utils@^1.0.0: | |
ajv-errors "^1.0.0" | ||
ajv-keywords "^3.1.0" | ||
|
||
schema-utils@^2.7.1: | ||
version "2.7.1" | ||
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" | ||
integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg== | ||
dependencies: | ||
"@types/json-schema" "^7.0.5" | ||
ajv "^6.12.4" | ||
ajv-keywords "^3.5.2" | ||
|
||
scss-tokenizer@^0.2.3: | ||
version "0.2.3" | ||
resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" | ||
|