feat: initial support for importing html from js
This commit is contained in:
2
test/js-import/fixtures/batman.js
Normal file
2
test/js-import/fixtures/batman.js
Normal file
@@ -0,0 +1,2 @@
|
||||
export const b = ()=>'batman';
|
||||
console.log(b());
|
||||
3
test/js-import/fixtures/icon.svg
Normal file
3
test/js-import/fixtures/icon.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<path style="fill:none;stroke:#00ff0d;stroke-width:5;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1" d="M4.1 14.72 16 26.31 28.38 5.09"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 244 B |
9
test/js-import/fixtures/index.html
Normal file
9
test/js-import/fixtures/index.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="icon" href="./icon.svg">
|
||||
<!-- <link rel="stylesheet" href="./joker.css">-->
|
||||
</head>
|
||||
<body>
|
||||
<!--<script src="./batman.js" type="module"></script>-->
|
||||
</body>
|
||||
</html>
|
||||
5
test/js-import/fixtures/index.js
Normal file
5
test/js-import/fixtures/index.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import html from "./index.html"
|
||||
|
||||
export function render(){
|
||||
return html;
|
||||
}
|
||||
1
test/js-import/fixtures/joker.css
Normal file
1
test/js-import/fixtures/joker.css
Normal file
@@ -0,0 +1 @@
|
||||
* { width: 100%; }
|
||||
Reference in New Issue
Block a user