-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support the
?inline
query for styles imported in JavaScript
- Loading branch information
Showing
14 changed files
with
206 additions
and
64 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
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
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
4 changes: 4 additions & 0 deletions
4
test/cases/js-import-css-modules-type-css-style-sheet-mix/expected/main.5b01e96e.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 @@ | ||
.hotpink { | ||
border: 5px solid hotpink; | ||
color: hotpink; | ||
} |
4 changes: 0 additions & 4 deletions
4
test/cases/js-import-css-modules-type-css-style-sheet-mix/expected/main.dc4ea4af.css
This file was deleted.
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
9 changes: 7 additions & 2 deletions
9
test/cases/js-import-css-modules-type-css-style-sheet-mix/src/main.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 |
---|---|---|
@@ -1,7 +1,12 @@ | ||
// import as CSSStyleSheet object | ||
import sheet from './style-c.css?sheet'; // `css-loader` option `exportType: 'css-style-sheet'` | ||
import './style-d.css'; // `css-loader` option `exportType: 'array'` | ||
|
||
// the extracted CSS will be injected into HTML | ||
import './style-d.css?inline'; // `css-loader` option `exportType: 'array'` | ||
|
||
// the extracted CSS will be saved into separate output file | ||
import './style-e.css'; // `css-loader` option `exportType: 'array'` | ||
|
||
console.log('sheet: ', sheet); | ||
|
||
document.adoptedStyleSheets = [sheet]; | ||
//shadowRoot.adoptedStyleSheets = [sheet]; // error in browser: shadowRoot is not defined |
4 changes: 4 additions & 0 deletions
4
test/cases/js-import-css-modules-type-css-style-sheet-mix/src/style-e.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 @@ | ||
.hotpink { | ||
border: 5px solid hotpink; | ||
color: hotpink; | ||
} |
Oops, something went wrong.