mirror of
https://github.com/getwax/bls-wallet-billboard.git
synced 2026-01-09 23:27:57 -05:00
Set up dev server, react
This commit is contained in:
11
assets/index.html
Normal file
11
assets/index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Billboard dApp</title>
|
||||
|
||||
<script src="/bundle.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +0,0 @@
|
||||
const msg: string = "Hello world!";
|
||||
|
||||
console.log(msg);
|
||||
8
frontend/index.tsx
Normal file
8
frontend/index.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
import * as React from "react";
|
||||
|
||||
import ReactDOM from "react-dom";
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
ReactDOM.render(<>Test</>, document.getElementById("app"));
|
||||
});
|
||||
@@ -10,7 +10,11 @@
|
||||
"license": "CC0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@types/react": "^17.0.42",
|
||||
"@types/react-dom": "^17.0.14",
|
||||
"hardhat": "^2.9.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"webpack": "^5.70.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -44,6 +48,7 @@
|
||||
"ts-node": "^10.1.0",
|
||||
"typechain": "^5.1.2",
|
||||
"typescript": "^4.5.2",
|
||||
"webpack-cli": "^4.9.2"
|
||||
"webpack-cli": "^4.9.2",
|
||||
"webpack-dev-server": "^4.7.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"outDir": "dist",
|
||||
"declaration": true
|
||||
"declaration": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"include": ["./scripts", "./test", "./typechain"],
|
||||
"include": ["./scripts", "./test", "./typechain", "./frontend"],
|
||||
"files": ["./hardhat.config.ts"]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
entry: "./frontend/index.ts",
|
||||
entry: "./frontend/index.tsx",
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
@@ -19,4 +19,16 @@ module.exports = {
|
||||
path: path.resolve(__dirname, "build"),
|
||||
},
|
||||
mode: "development",
|
||||
devServer: {
|
||||
static: [
|
||||
{
|
||||
directory: path.join(__dirname, "build"),
|
||||
},
|
||||
{
|
||||
directory: path.join(__dirname, "assets"),
|
||||
},
|
||||
],
|
||||
compress: true,
|
||||
port: 9000,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user