Reactアプリケーションのセットアップ

- デモを削除
- ディレクトリの分割
- sassの設定
- AutoImportの設定
This commit is contained in:
Keisuke Hirata 2024-12-25 06:01:04 +09:00
parent f33ab6e181
commit d041e59698
21 changed files with 508 additions and 161 deletions

View File

@ -1,5 +1,40 @@
import { defineConfig } from '@farmfe/core';
import path from 'path';
import AutoImport from 'unplugin-auto-import/vite'
export default defineConfig({
plugins: ['@farmfe/plugin-react']
compilation: {
html: {
base: "./src/app.html",
},
input: {
index: "./src/pages/index.html",
dashboard: "./src/pages/dashboard.html",
"404": "./src/pages/error/404.html",
"500": "./src/pages/error/500.html",
},
output: {
path: 'build',
filename: 'assets/[name].[hash].[ext]',
assetsFilename: 'static/[resourceName].[ext]'
},
resolve: {
alias: {
"@/": path.join(process.cwd()),
"$/": path.join(process.cwd(), "src", "lib"),
},
},
},
plugins: [
'@farmfe/plugin-react',
'@farmfe/plugin-sass',
],
vitePlugins: [
AutoImport({
include: [/\.[jt]sx?$/],
imports: ['react'],
dirs: ['./src/**'],
dts: './src/auto-imports.d.ts'
}),
],
});

View File

@ -2,7 +2,6 @@
"name": "co-workingspace",
"version": "1.0.0",
"scripts": {
"dev": "farm start",
"start": "farm start",
"build": "farm build",
"preview": "farm preview",
@ -16,9 +15,11 @@
"@farmfe/cli": "^1.0.2",
"@farmfe/core": "^1.3.0",
"@farmfe/plugin-react": "^1.2.0",
"@farmfe/plugin-sass": "^1.1.0",
"@types/react": "18",
"core-js": "^3.36.1",
"@types/react-dom": "18",
"react-refresh": "^0.14.0"
"core-js": "^3.36.1",
"react-refresh": "^0.14.0",
"unplugin-auto-import": "^0.19.0"
}
}

View File

@ -24,6 +24,9 @@ importers:
'@farmfe/plugin-react':
specifier: ^1.2.0
version: 1.2.6
'@farmfe/plugin-sass':
specifier: ^1.1.0
version: 1.1.0
'@types/react':
specifier: '18'
version: 18.3.13
@ -36,9 +39,15 @@ importers:
react-refresh:
specifier: ^0.14.0
version: 0.14.2
unplugin-auto-import:
specifier: ^0.19.0
version: 0.19.0
packages:
'@antfu/utils@0.7.10':
resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==}
'@babel/runtime@7.26.0':
resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==}
engines: {node: '>=6.9.0'}
@ -218,6 +227,64 @@ packages:
'@farmfe/plugin-react@1.2.6':
resolution: {integrity: sha512-AVXMnqwekp+Cke6a16/xWnviUnQiFeY1FhxkTGJVamHQFgGmm+uAhPXJ85sQDQLAwtkAMd8rimEhNFVeHIKkaw==}
'@farmfe/plugin-sass-darwin-arm64@1.1.0':
resolution: {integrity: sha512-KGgBITx/nspD2WT7B+omMuHTcoFySWy2IonRf5Ga9KbmPHwoqxAKMRVa6qXhQ5lc7VvuF4qjTb55iqOCX7b1ug==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
'@farmfe/plugin-sass-darwin-x64@1.1.0':
resolution: {integrity: sha512-gtdpL+aLjR0VEaXIt3ThWu8jne8Fd3N1y2CVR+LC8OwRTq50sObJi5zlGnpxJVVNYOF2tf53u0GbiuFv2bpGmA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
'@farmfe/plugin-sass-linux-arm64-gnu@1.1.0':
resolution: {integrity: sha512-JbpscbkOd2k6eFzi8nkhgmmxUPTCroSMjn2O9/X4kvvBB95s4q8N73dqpOIS+zjS35XYlaWrPZz7fvG6V2yumg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
'@farmfe/plugin-sass-linux-arm64-musl@1.1.0':
resolution: {integrity: sha512-iYZ7QnnOXK3q8KLOoiQxv5OD5AhSXg05Tcezkit3oUghHWLbJI2X+rOUtvQ4cdBdNQm8eU6fUblYdkPaPmWpPA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
'@farmfe/plugin-sass-linux-x64-gnu@1.1.0':
resolution: {integrity: sha512-KD2dAPwAsZupDBkiyF0LKZmxe31TixPRs+T2Qrj+fZD3h4rNwyApLw7NBtFk2KVCoRl7BOjLKGbRX0U3W7XLMA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
'@farmfe/plugin-sass-linux-x64-musl@1.1.0':
resolution: {integrity: sha512-bEZxq6MjA/mKCYCXFnfRfomcgur1d80owhFFUHVXhbuUo0mFST0EETfd2z/XUMNtQrgmqNWqMzxnlSVMZsCIUA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
'@farmfe/plugin-sass-win32-arm64-msvc@1.1.0':
resolution: {integrity: sha512-SL+YVEZG5PHWpL4hvB3jML4UBQuATh8HnmKA/kNIh1TxQAtU9g/7Tx+8P5E8873BdJzRN0Pvcr96sZT7KtQcpQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
'@farmfe/plugin-sass-win32-ia32-msvc@1.1.0':
resolution: {integrity: sha512-5y3I27JeKq4NuI5IFEa68GJlzlhoD6nLClU02DmYRYx9+EFh98SlxWnR+XXgpruHnTw8Lw3iwOwOukLGC4zWJg==}
engines: {node: '>= 10'}
cpu: [ia32]
os: [win32]
'@farmfe/plugin-sass-win32-x64-msvc@1.1.0':
resolution: {integrity: sha512-t6uWAeL20W+hFjG4B1851HUm6ygtD2KJDJ8rLQhXYqZ3z3ctR72lUhsp89cWHXfAPy0oVG3Cwk6gopIrg3RypQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
'@farmfe/plugin-sass@1.1.0':
resolution: {integrity: sha512-SJYqe9Qomn+xTfEKOsOi8YjDcDxbtSYBJK5xsBfWT8G6EIPcbzTcMPeK4GfJhQ/P/BSCZ3w7/yH+S/ev+0vlxg==}
engines: {node: '>=16'}
'@farmfe/runtime-plugin-hmr@3.5.9':
resolution: {integrity: sha512-odXeRDdSf5xpW9edm2C5xziIdhsaoWjibIFiA2WJS9cdQmmE/ndqNV8bYpf4I7Ke4wiWS2f9kLKyZMigD6HiVQ==}
@ -233,6 +300,9 @@ packages:
'@farmfe/utils@0.1.0':
resolution: {integrity: sha512-neNJQGqV7XL4XifG1uHOBFSFLy2yx1/DVZNRA7nfeEAXEksVZTwWA+fZrYEaI0w7Sw6K/9NYn9Jgpn+NAT0mcg==}
'@jridgewell/sourcemap-codec@1.5.0':
resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}
'@koa/cors@5.0.0':
resolution: {integrity: sha512-x/iUDjcS90W69PryLDIMgFyV21YLTnG9zOpPXS7Bkt2b8AsY3zZsIpOLBkYr9fBcF3HbkKaER5hOBZLfpLgYNw==}
engines: {node: '>= 14.0.0'}
@ -262,9 +332,21 @@ packages:
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
engines: {node: '>= 8'}
'@rollup/pluginutils@5.1.4':
resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==}
engines: {node: '>=14.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
peerDependenciesMeta:
rollup:
optional: true
'@swc/helpers@0.5.15':
resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}
'@types/estree@1.0.6':
resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
'@types/http-proxy@1.17.15':
resolution: {integrity: sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==}
@ -296,6 +378,11 @@ packages:
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
engines: {node: '>= 0.6'}
acorn@8.14.0:
resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==}
engines: {node: '>=0.4.0'}
hasBin: true
ansi-colors@4.1.3:
resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==}
engines: {node: '>=6'}
@ -430,6 +517,9 @@ packages:
resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==}
engines: {node: '>= 0.6'}
confbox@0.1.8:
resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==}
content-disposition@0.5.4:
resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==}
engines: {node: '>= 0.6'}
@ -567,6 +657,12 @@ packages:
engines: {node: '>=4'}
hasBin: true
estree-walker@2.0.2:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
estree-walker@3.0.3:
resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
eventemitter3@4.0.7:
resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==}
@ -881,6 +977,9 @@ packages:
js-tokens@4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
js-tokens@9.0.1:
resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==}
js-yaml@3.14.1:
resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==}
hasBin: true
@ -924,6 +1023,10 @@ packages:
resolution: {integrity: sha512-j/8tY9j5t+GVMLeioLaxweJiKUayFhlGqNTzf2ZGwL0ZCQijd2RLHK0SLW5Tsko8YyyqCZC2cojIb0/s62qTAg==}
engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4}
local-pkg@0.5.1:
resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==}
engines: {node: '>=14'}
locate-path@5.0.0:
resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==}
engines: {node: '>=8'}
@ -949,6 +1052,9 @@ packages:
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
hasBin: true
magic-string@0.30.17:
resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==}
media-typer@0.3.0:
resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
engines: {node: '>= 0.6'}
@ -984,6 +1090,9 @@ packages:
resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==}
engines: {node: '>=12'}
mlly@1.7.3:
resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==}
mri@1.2.0:
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
engines: {node: '>=4'}
@ -1095,6 +1204,9 @@ packages:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
pathe@1.1.2:
resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}
picocolors@1.1.1:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
@ -1102,10 +1214,17 @@ packages:
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
engines: {node: '>=8.6'}
picomatch@4.0.2:
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
engines: {node: '>=12'}
pify@4.0.1:
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
engines: {node: '>=6'}
pkg-types@1.2.1:
resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==}
prettier@2.8.8:
resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
engines: {node: '>=10.13.0'}
@ -1181,9 +1300,54 @@ packages:
safer-buffer@2.1.2:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
sass-embedded-darwin-arm64@1.62.0:
resolution: {integrity: sha512-bYEM6DY7kteOd/aJXUisiavm8B1acRhpIn+rhzKZeTn87kUW5RzZv2nKaSmb1vUd4ZptDGaJ144qz/d20rnogQ==}
engines: {node: '>=14.0.0'}
cpu: [arm64]
os: [darwin]
sass-embedded-darwin-x64@1.62.0:
resolution: {integrity: sha512-2sBQ4uWjZbf8TKXF8Aq7N0p5V2tKUr4zX9gQAiKvm1NBYwsW22+m8D34heOWu50ikpIxebvt7i/z7hafH5kzKg==}
engines: {node: '>=14.0.0'}
cpu: [x64]
os: [darwin]
sass-embedded-linux-arm64@1.62.0:
resolution: {integrity: sha512-FexUt8aE7I7fJub3N6+NsDdbPRP/O8o400qpbEbY7BWgiWEdpr81OBulQZY/2LzZUnz9keUhfpmltNY3SNg3kg==}
engines: {node: '>=14.0.0'}
cpu: [arm64]
os: [linux]
sass-embedded-linux-ia32@1.62.0:
resolution: {integrity: sha512-VpDHtMIwcoWqDsiskjhDYAle0SJV4mUiZJTXg5RkMzoX1ZyNiVz+uNaZ88kDqcGXsWpe2i0sIlljD4ryaiMAhA==}
engines: {node: '>=14.0.0'}
cpu: [ia32]
os: [linux]
sass-embedded-linux-x64@1.62.0:
resolution: {integrity: sha512-dntYMsu0QonlerFB8VDlzxoJcpMEtN9lPHstKOQ6rk6hbSFPvcI8MqqUomlOjmpakKeVrpyZ04nm9jHrzlFmYg==}
engines: {node: '>=14.0.0'}
cpu: [x64]
os: [linux]
sass-embedded-win32-ia32@1.62.0:
resolution: {integrity: sha512-rTCZCVkQa6XcreyQ8gYqnsEG13HCzqKoN2mCvIuGwJro8IjyT2PzWauouO0M06T0FLH0pc3EvKdKaLdtijf9AQ==}
engines: {node: '>=14.0.0'}
cpu: [ia32]
os: [win32]
sass-embedded-win32-x64@1.62.0:
resolution: {integrity: sha512-g6DZBPGfIDKLBarvYRVKJ+7rJAHJXkOQQVrYSWm22klA9ZNZ0CaVyqLqejttZPKGreD8h/xh2uz/s6w/P900Sw==}
engines: {node: '>=14.0.0'}
cpu: [x64]
os: [win32]
scheduler@0.23.2:
resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==}
scule@1.3.0:
resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==}
semver@7.6.3:
resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}
engines: {node: '>=10'}
@ -1251,6 +1415,9 @@ packages:
resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==}
engines: {node: '>=12'}
strip-literal@2.1.1:
resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==}
supports-color@7.2.0:
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
engines: {node: '>=8'}
@ -1294,9 +1461,15 @@ packages:
resolution: {integrity: sha512-k24RCVWlEcjkdOxYmVJgeD/0a1TiSpqLg+ZalVGV9lsnr4yqu0w7tX/x2xX6G4zpkgQnRf89lxuZ1wsbjXM8lw==}
hasBin: true
ufo@1.5.4:
resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==}
undici-types@6.20.0:
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
unimport@3.14.5:
resolution: {integrity: sha512-tn890SwFFZxqaJSKQPPd+yygfKSATbM8BZWW1aCR2TJBTs1SDrmLamBueaFtYsGjHtQaRgqEbQflOjN2iW12gA==}
universalify@0.1.2:
resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==}
engines: {node: '>= 4.0.0'}
@ -1305,6 +1478,26 @@ packages:
resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}
engines: {node: '>= 10.0.0'}
unplugin-auto-import@0.19.0:
resolution: {integrity: sha512-W97gTDEWu/L1EcKCXY5Ni8bsMW1E9kv12wYQv3mYpd7zcFctXYlLKsqeva6sbCQbzS8t9AG/XdU5/WkEJKPlFw==}
engines: {node: '>=14'}
peerDependencies:
'@nuxt/kit': ^3.2.2
'@vueuse/core': '*'
peerDependenciesMeta:
'@nuxt/kit':
optional: true
'@vueuse/core':
optional: true
unplugin@1.16.0:
resolution: {integrity: sha512-5liCNPuJW8dqh3+DM6uNM2EI3MLLpCKp/KY+9pB5M2S2SR2qvvDHhKgBOaTWEbZTAws3CXfB0rKTIolWKL05VQ==}
engines: {node: '>=14.0.0'}
unplugin@2.1.0:
resolution: {integrity: sha512-us4j03/499KhbGP8BU7Hrzrgseo+KdfJYWcbcajCOqsAyb8Gk0Yn2kiUIcZISYCb1JFaZfIuG3b42HmguVOKCQ==}
engines: {node: '>=18.12.0'}
untildify@4.0.0:
resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==}
engines: {node: '>=8'}
@ -1329,6 +1522,9 @@ packages:
wcwidth@1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
webpack-virtual-modules@0.6.2:
resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==}
which@2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
@ -1365,6 +1561,8 @@ packages:
snapshots:
'@antfu/utils@0.7.10': {}
'@babel/runtime@7.26.0':
dependencies:
regenerator-runtime: 0.14.1
@ -1628,6 +1826,52 @@ snapshots:
'@farmfe/plugin-react-win32-ia32-msvc': 1.2.6
'@farmfe/plugin-react-win32-x64-msvc': 1.2.6
'@farmfe/plugin-sass-darwin-arm64@1.1.0':
optional: true
'@farmfe/plugin-sass-darwin-x64@1.1.0':
optional: true
'@farmfe/plugin-sass-linux-arm64-gnu@1.1.0':
optional: true
'@farmfe/plugin-sass-linux-arm64-musl@1.1.0':
optional: true
'@farmfe/plugin-sass-linux-x64-gnu@1.1.0':
optional: true
'@farmfe/plugin-sass-linux-x64-musl@1.1.0':
optional: true
'@farmfe/plugin-sass-win32-arm64-msvc@1.1.0':
optional: true
'@farmfe/plugin-sass-win32-ia32-msvc@1.1.0':
optional: true
'@farmfe/plugin-sass-win32-x64-msvc@1.1.0':
optional: true
'@farmfe/plugin-sass@1.1.0':
optionalDependencies:
'@farmfe/plugin-sass-darwin-arm64': 1.1.0
'@farmfe/plugin-sass-darwin-x64': 1.1.0
'@farmfe/plugin-sass-linux-arm64-gnu': 1.1.0
'@farmfe/plugin-sass-linux-arm64-musl': 1.1.0
'@farmfe/plugin-sass-linux-x64-gnu': 1.1.0
'@farmfe/plugin-sass-linux-x64-musl': 1.1.0
'@farmfe/plugin-sass-win32-arm64-msvc': 1.1.0
'@farmfe/plugin-sass-win32-ia32-msvc': 1.1.0
'@farmfe/plugin-sass-win32-x64-msvc': 1.1.0
sass-embedded-darwin-arm64: 1.62.0
sass-embedded-darwin-x64: 1.62.0
sass-embedded-linux-arm64: 1.62.0
sass-embedded-linux-ia32: 1.62.0
sass-embedded-linux-x64: 1.62.0
sass-embedded-win32-ia32: 1.62.0
sass-embedded-win32-x64: 1.62.0
'@farmfe/runtime-plugin-hmr@3.5.9':
dependencies:
core-js: 3.39.0
@ -1644,6 +1888,8 @@ snapshots:
'@farmfe/utils@0.1.0': {}
'@jridgewell/sourcemap-codec@1.5.0': {}
'@koa/cors@5.0.0':
dependencies:
vary: 1.1.2
@ -1682,10 +1928,18 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.17.1
'@rollup/pluginutils@5.1.4':
dependencies:
'@types/estree': 1.0.6
estree-walker: 2.0.2
picomatch: 4.0.2
'@swc/helpers@0.5.15':
dependencies:
tslib: 2.8.1
'@types/estree@1.0.6': {}
'@types/http-proxy@1.17.15':
dependencies:
'@types/node': 22.10.1
@ -1718,6 +1972,8 @@ snapshots:
mime-types: 2.1.35
negotiator: 0.6.3
acorn@8.14.0: {}
ansi-colors@4.1.3: {}
ansi-escapes@4.3.2:
@ -1845,6 +2101,8 @@ snapshots:
dependencies:
mime-db: 1.53.0
confbox@0.1.8: {}
content-disposition@0.5.4:
dependencies:
safe-buffer: 5.2.1
@ -1949,6 +2207,12 @@ snapshots:
esprima@4.0.1: {}
estree-walker@2.0.2: {}
estree-walker@3.0.3:
dependencies:
'@types/estree': 1.0.6
eventemitter3@4.0.7: {}
execa@5.1.1:
@ -2270,6 +2534,8 @@ snapshots:
js-tokens@4.0.0: {}
js-tokens@9.0.1: {}
js-yaml@3.14.1:
dependencies:
argparse: 1.0.10
@ -2350,6 +2616,11 @@ snapshots:
transitivePeerDependencies:
- supports-color
local-pkg@0.5.1:
dependencies:
mlly: 1.7.3
pkg-types: 1.2.1
locate-path@5.0.0:
dependencies:
p-locate: 4.1.0
@ -2371,6 +2642,10 @@ snapshots:
dependencies:
js-tokens: 4.0.0
magic-string@0.30.17:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
media-typer@0.3.0: {}
merge-stream@2.0.0: {}
@ -2394,6 +2669,13 @@ snapshots:
mimic-fn@4.0.0: {}
mlly@1.7.3:
dependencies:
acorn: 8.14.0
pathe: 1.1.2
pkg-types: 1.2.1
ufo: 1.5.4
mri@1.2.0: {}
ms@2.1.3: {}
@ -2483,12 +2765,22 @@ snapshots:
path-type@4.0.0: {}
pathe@1.1.2: {}
picocolors@1.1.1: {}
picomatch@2.3.1: {}
picomatch@4.0.2: {}
pify@4.0.1: {}
pkg-types@1.2.1:
dependencies:
confbox: 0.1.8
mlly: 1.7.3
pathe: 1.1.2
prettier@2.8.8: {}
queue-microtask@1.2.3: {}
@ -2558,10 +2850,33 @@ snapshots:
safer-buffer@2.1.2: {}
sass-embedded-darwin-arm64@1.62.0:
optional: true
sass-embedded-darwin-x64@1.62.0:
optional: true
sass-embedded-linux-arm64@1.62.0:
optional: true
sass-embedded-linux-ia32@1.62.0:
optional: true
sass-embedded-linux-x64@1.62.0:
optional: true
sass-embedded-win32-ia32@1.62.0:
optional: true
sass-embedded-win32-x64@1.62.0:
optional: true
scheduler@0.23.2:
dependencies:
loose-envify: 1.4.0
scule@1.3.0: {}
semver@7.6.3: {}
set-function-length@1.2.2:
@ -2618,6 +2933,10 @@ snapshots:
strip-final-newline@3.0.0: {}
strip-literal@2.1.1:
dependencies:
js-tokens: 9.0.1
supports-color@7.2.0:
dependencies:
has-flag: 4.0.0
@ -2649,12 +2968,55 @@ snapshots:
ua-parser-js@1.0.39: {}
ufo@1.5.4: {}
undici-types@6.20.0: {}
unimport@3.14.5:
dependencies:
'@rollup/pluginutils': 5.1.4
acorn: 8.14.0
escape-string-regexp: 5.0.0
estree-walker: 3.0.3
fast-glob: 3.3.2
local-pkg: 0.5.1
magic-string: 0.30.17
mlly: 1.7.3
pathe: 1.1.2
picomatch: 4.0.2
pkg-types: 1.2.1
scule: 1.3.0
strip-literal: 2.1.1
unplugin: 1.16.0
transitivePeerDependencies:
- rollup
universalify@0.1.2: {}
universalify@2.0.1: {}
unplugin-auto-import@0.19.0:
dependencies:
'@antfu/utils': 0.7.10
'@rollup/pluginutils': 5.1.4
local-pkg: 0.5.1
magic-string: 0.30.17
picomatch: 4.0.2
unimport: 3.14.5
unplugin: 2.1.0
transitivePeerDependencies:
- rollup
unplugin@1.16.0:
dependencies:
acorn: 8.14.0
webpack-virtual-modules: 0.6.2
unplugin@2.1.0:
dependencies:
acorn: 8.14.0
webpack-virtual-modules: 0.6.2
untildify@4.0.0: {}
update-browserslist-db@1.1.1(browserslist@4.24.2):
@ -2673,6 +3035,8 @@ snapshots:
dependencies:
defaults: 1.0.4
webpack-virtual-modules@0.6.2: {}
which@2.0.2:
dependencies:
isexe: 2.0.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,14 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<title>Farm + React + TS</title>
<title>CoWorkingSpace</title>
</head>
<body>
<script src="@/src/app.tsx"></script>
<div id="root"></div>
<script src="./src/index.tsx"></script>
{{children}}
</body>
</html>

22
src/app.scss Normal file
View File

@ -0,0 +1,22 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #212121;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
}

2
src/app.tsx Normal file
View File

@ -0,0 +1,2 @@
import '$/destyle.css';
import './app.scss';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

30
src/auto-imports.d.ts vendored Normal file
View File

@ -0,0 +1,30 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
// biome-ignore lint: disable
export {}
declare global {
const Main: typeof import('./pages/index')['Main']
const createRef: typeof import('react')['createRef']
const forwardRef: typeof import('react')['forwardRef']
const lazy: typeof import('react')['lazy']
const memo: typeof import('react')['memo']
const startTransition: typeof import('react')['startTransition']
const useCallback: typeof import('react')['useCallback']
const useContext: typeof import('react')['useContext']
const useDebugValue: typeof import('react')['useDebugValue']
const useDeferredValue: typeof import('react')['useDeferredValue']
const useEffect: typeof import('react')['useEffect']
const useId: typeof import('react')['useId']
const useImperativeHandle: typeof import('react')['useImperativeHandle']
const useInsertionEffect: typeof import('react')['useInsertionEffect']
const useLayoutEffect: typeof import('react')['useLayoutEffect']
const useMemo: typeof import('react')['useMemo']
const useReducer: typeof import('react')['useReducer']
const useRef: typeof import('react')['useRef']
const useState: typeof import('react')['useState']
const useSyncExternalStore: typeof import('react')['useSyncExternalStore']
const useTransition: typeof import('react')['useTransition']
}

View File

@ -1,69 +0,0 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
a {
font-weight: 500;
color: #9f1a8f;
text-decoration: inherit;
}
a:hover {
color: #9f1a8f;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #9f1a8f;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #9F1A8F;
}
button {
background-color: #f9f9f9;
}
}

View File

@ -1,10 +0,0 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
import { Main } from './main';
import './index.css'
const container = document.querySelector('#root')!;
const root = createRoot(container);
root.render(<Main />);

2
src/lib/destyle.css Normal file
View File

@ -0,0 +1,2 @@
/*! destyle.css v4.0.1 | MIT License | https://github.com/nicolas-cusan/destyle.min.css */
*,::before,::after{box-sizing:border-box;border-style:solid;border-width:0;min-width:0}html{line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}body{margin:0}main{display:block}p,table,blockquote,address,pre,iframe,form,figure,dl{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}ul,ol{margin:0;padding:0;list-style:none}dt{font-weight:700}dd{margin-left:0}hr{box-sizing:content-box;height:0;overflow:visible;border-top-width:1px;margin:0;clear:both;color:inherit}pre{font-family:monospace,monospace;font-size:inherit}address{font-style:inherit}a{background-color:transparent;text-decoration:none;color:inherit}abbr[title]{text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:inherit}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}svg,img,embed,object,iframe{vertical-align:bottom}button,input,optgroup,select,textarea{-webkit-appearance:none;appearance:none;vertical-align:middle;color:inherit;font:inherit;background:transparent;padding:0;margin:0;border-radius:0;text-align:inherit;text-transform:inherit}button,[type="button"],[type="reset"],[type="submit"]{cursor:pointer}button:disabled,[type="button"]:disabled,[type="reset"]:disabled,[type="submit"]:disabled{cursor:default}:-moz-focusring{outline:auto}select:disabled{opacity:inherit}option{padding:0}fieldset{margin:0;padding:0;min-width:0}legend{padding:0}progress{vertical-align:baseline}textarea{overflow:auto}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}[type="number"]{-moz-appearance:textfield}label[for]{cursor:pointer}details{display:block}summary{display:list-item}[contenteditable]:focus{outline:auto}table{border-color:inherit;border-collapse:collapse}caption{text-align:left}td,th{vertical-align:top;padding:0}th{text-align:left;font-weight:700}

View File

@ -1,42 +0,0 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #9F1A8Faa);
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}
@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
}
.card {
padding: 2em;
}
.read-the-docs {
color: #888;
}

View File

@ -1,32 +0,0 @@
import React, { useState } from "react";
import "./main.css";
import reactLogo from "./assets/react.svg";
import FarmLogo from "./assets/logo.png";
export function Main() {
const [count, setCount] = useState(0);
return (
<>
<div>
<a href="https://farmfe.org/" target="_blank">
<img src={FarmLogo} className="logo" alt="Farm logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Farm + Reaact</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/main.tsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Farm and React logos to learn more
</p>
</>
);
}

0
src/pages/dashboard.html Normal file
View File

0
src/pages/error/404.html Normal file
View File

0
src/pages/error/500.html Normal file
View File

1
src/pages/index.html Normal file
View File

@ -0,0 +1 @@
<script src="./index.tsx"></script>

19
src/pages/index.scss Normal file
View File

@ -0,0 +1,19 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
h1 {
font-size: 2rem;
}
button {
background-color: #434343;
color: white;
padding: 0.2rem 0.7rem;
border: none;
border-radius: 0.25rem;
cursor: pointer;
}

24
src/pages/index.tsx Normal file
View File

@ -0,0 +1,24 @@
import { createRoot } from 'react-dom/client';
const container = document.querySelector('#root')!;
const root = createRoot(container);
import './index.scss';
export function Main() {
const [count, setCount] = useState(0);
return (
<>
<h1>Hello!</h1>
<div>
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
</div>
</>
);
}
root.render(<Main />);