-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Improved and document the code based on the vue jsx plugin
- Loading branch information
1 parent
864d016
commit 4efa4d9
Showing
11 changed files
with
250 additions
and
135 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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Playground</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="./index.tsx" type="module"></script> | ||
</body> | ||
</html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Playground</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="./index.jsx" type="module"></script> | ||
</body> | ||
</html> |
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,25 @@ | ||
import { render } from 'solid-js/web'; | ||
import { Router, Route } from 'solid-app-router'; | ||
|
||
const App = () => <Route />; | ||
|
||
const routes = [ | ||
{ | ||
path: '/', | ||
component: () => <h1>Hello world</h1>, | ||
}, | ||
]; | ||
|
||
const dispose = render( | ||
() => ( | ||
<Router routes={routes}> | ||
<App /> | ||
</Router> | ||
), | ||
document.getElementById('app'), | ||
); | ||
|
||
if (import.meta.hot) { | ||
import.meta.hot.accept(); | ||
import.meta.hot.dispose(dispose); | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { solidPlugin } from '..'; | ||
import solid from '..'; | ||
import type { UserConfig } from 'vite'; | ||
|
||
const config: UserConfig = { | ||
plugins: [solidPlugin()], | ||
plugins: [solid()], | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.