-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
aeb5b74
commit 12d0cc0
Showing
7 changed files
with
59 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.dynamic { | ||
color: green; | ||
} |
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,2 +1,11 @@ | ||
<h1>This should be red</h1> | ||
<h2>This should be blue</h2> | ||
|
||
<p class="dynamic">This should be green</p> | ||
<p class="inline">This should not be yellow</p> | ||
<p class="dynamic-inline"></p> | ||
<p class="mod">This should be yellow</p> | ||
<p class="dynamic-module"></p> | ||
|
||
<script type="module" src="/main.js"></script> | ||
<div id="app"></div> |
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,3 @@ | ||
.inline { | ||
color: yellow; | ||
} |
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,6 +1,15 @@ | ||
import './style.css' | ||
import './main.css' | ||
|
||
document.getElementById( | ||
'app' | ||
).innerHTML = `<h1>This should be red</h1><h2>This should be blue</h2>` | ||
import('./async.css') | ||
|
||
import('./inline.css?inline').then((css) => { | ||
document.querySelector('.dynamic-inline').textContent = css.default | ||
}) | ||
|
||
import('./mod.module.css').then((css) => { | ||
document.querySelector('.dynamic-module').textContent = JSON.stringify( | ||
css.default | ||
) | ||
document.querySelector('.mod').classList.add(css.default.mod) | ||
}) |
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,3 @@ | ||
.mod { | ||
color: yellow; | ||
} |