adding in some files for the authentication flow and cleaning things u

This commit is contained in:
talksik
2022-03-16 10:56:06 -04:00
parent 0ad5429b53
commit fb35e2835e
24 changed files with 103 additions and 2968 deletions
+10 -2
View File
@@ -11,6 +11,7 @@ import {
import Home from "./pages/Home";
import Login from "./pages/Login";
import ProtectedRoute from "./components/ProtectedRoute";
import testConnection from "@nirvana/core";
testConnection();
@@ -25,8 +26,15 @@ function App() {
<HashRouter>
<div className="App">
<Routes>
<Route path="/" element={<Login />} />
<Route path="/home" element={<Home />} />
<Route path="/login" element={<Login />} />
<Route
path="/home"
element={
<ProtectedRoute>
<Home />
</ProtectedRoute>
}
/>
{/* <Route exact path="/profile/create" component={Sit} />
<Route exact path="/profile/edit" component={Sit} /> */}
</Routes>
@@ -0,0 +1,22 @@
import { Route, useNavigate } from "react-router-dom";
import { useGetUserDetails } from "../../controller/index";
export default function ProtectedRoute({ ...children }) {
const { isLoading, isError } = useGetUserDetails();
const navigate = useNavigate();
if (isLoading) return <span>please wait while we authenticate you</span>;
if (isError) {
// toast.error("Please sign in first!");
navigate("/login");
return <span>you are not allowed here!</span>;
}
// if we can successfully get user details, we are good to continue
return <>{children}</>;
}
-16
View File
@@ -1,16 +0,0 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/electron",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser"
}
-89
View File
@@ -1,89 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# Webpack
.webpack/
# Electron-Forge
out/
-96
View File
@@ -1,96 +0,0 @@
{
"name": "desktop2",
"productName": "desktop2",
"version": "1.0.0",
"description": "My Electron application description",
"main": ".webpack/main",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "eslint --ext .ts,.tsx ."
},
"keywords": [],
"author": {
"name": "talksik",
"email": "patel.arjun50@gmail.com"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "desktop2"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
],
"plugins": [
[
"@electron-forge/plugin-webpack",
{
"mainConfig": "./webpack.main.config.js",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
{
"html": "./src/index.html",
"js": "./src/renderer.ts",
"name": "main_window",
"preload": {
"js": "./src/preload.ts"
}
}
]
}
}
]
]
}
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.63",
"@electron-forge/maker-deb": "^6.0.0-beta.63",
"@electron-forge/maker-rpm": "^6.0.0-beta.63",
"@electron-forge/maker-squirrel": "^6.0.0-beta.63",
"@electron-forge/maker-zip": "^6.0.0-beta.63",
"@electron-forge/plugin-webpack": "6.0.0-beta.63",
"@types/react": "^17.0.40",
"@types/react-dom": "^17.0.13",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"@vercel/webpack-asset-relocator-loader": "1.7.0",
"css-loader": "^6.0.0",
"electron": "17.1.2",
"eslint": "^8.0.1",
"eslint-plugin-import": "^2.25.0",
"fork-ts-checker-webpack-plugin": "^6.0.1",
"node-loader": "^2.0.0",
"style-loader": "^3.0.0",
"ts-loader": "^9.2.2",
"typescript": "~4.5.4"
},
"dependencies": {
"electron-squirrel-startup": "^1.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.2.2"
}
}
-25
View File
@@ -1,25 +0,0 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import { HashRouter, Route, Routes } from "react-router-dom";
import Home from "./pages/Home";
import Login from "./pages/Login";
function render() {
ReactDOM.render(
<HashRouter>
<div className="App">
<Routes>
<Route path="/" element={<Login />} />
<Route path="/home" element={<Home />} />
{/* <Route exact path="/profile/create" component={Sit} />
<Route exact path="/profile/edit" component={Sit} /> */}
</Routes>
</div>
</HashRouter>,
document.body
);
}
render();
@@ -1,93 +0,0 @@
export enum LogoType {
primary = "primary",
small = "small",
}
export default function Logo({
className,
type,
}: {
className: string;
type?: LogoType;
}) {
if (type === LogoType.small) {
return (
<svg
width="85"
height="107"
viewBox="0 0 85 107"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<path
d="M0.398438 25.9375C1.84375 26.9531 2.89453 27.6562 3.91016 28.4023C11.9258 34.2617 19.9336 40.125 27.9414 45.9961C32.8008 49.5391 37.1211 53.5898 40.1445 58.8867C42.6094 63.0898 44.1328 67.6172 44.7148 72.4648C44.9258 74.1797 45.0469 75.9062 45.0703 77.6367C45.1055 86.8281 45.0703 96.0156 45.0703 105.207V106.809C44.5742 106.562 44.0938 106.289 43.625 105.992C34.1094 99.043 24.5391 92.1523 15.1055 85.0859C6.83203 78.8672 1.97266 70.5273 0.734375 60.1484C0.527344 58.3633 0.421875 56.5703 0.414062 54.7734C0.398439 46.0312 0.398438 37.2891 0.398438 28.5508V25.9375Z"
fill="#438E86"
/>
<path
d="M84.2539 15.5039V23.0859C84.2539 28.0352 84.2851 32.9844 84.2539 37.9297C84.1875 46.7539 80.4922 53.875 73.6367 59.1641C66.6484 64.5703 59.4023 69.6328 52.2617 74.8477C52.0078 75.0352 51.7422 75.207 51.2695 75.5352C51.164 75.0273 51.0937 74.5117 51.0586 73.9922C51.0586 66.9883 50.9492 59.9805 51.0781 52.9805C51.2382 44.5977 54.539 37.5352 61.0937 32.3828C68.3945 26.6445 76.0117 21.3125 83.4961 15.8125C83.7422 15.6914 83.9961 15.5859 84.2539 15.5039Z"
fill="#438E86"
/>
<path
d="M44.957 44.9219L39.5781 40.9766C36.0156 38.3672 32.4336 35.7812 28.8828 33.1484C23.1992 28.9219 20.3281 23.2539 20.332 16.1367V2.45703C20.332 1.82813 20.332 1.20312 20.332 0.308594C20.8125 0.488281 21.2773 0.707031 21.7188 0.964844C26.6875 4.58203 31.6875 8.16016 36.5898 11.8672C41.1133 15.2852 44 19.7812 44.8516 25.4844C44.9648 26.0469 45.0352 26.6172 45.0625 27.1953C45.082 32.6562 45.0938 38.1172 45.0898 43.5742C45.0898 43.8828 45.0312 44.1914 44.957 44.9219Z"
fill="#438E86"
/>
</svg>
);
}
return (
<svg
width="233"
height="162"
viewBox="0 0 233 162"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<path
d="M74.3984 26.6133C75.8437 27.6289 76.8945 28.332 77.9102 29.0781C85.9258 34.9375 93.9336 40.8008 101.941 46.6719C106.801 50.2148 111.121 54.2656 114.145 59.5625C116.609 63.7656 118.133 68.293 118.715 73.1406C118.926 74.8555 119.047 76.582 119.07 78.3125C119.105 87.5039 119.07 96.6914 119.07 105.883V107.484C118.574 107.238 118.094 106.965 117.625 106.668C108.109 99.7188 98.5391 92.8281 89.1055 85.7617C80.832 79.543 75.9727 71.2031 74.7344 60.8242C74.5273 59.0391 74.4219 57.2461 74.4141 55.4492C74.3984 46.707 74.3984 37.9648 74.3984 29.2266V26.6133Z"
fill="#438E86"
/>
<path
d="M158.254 16.1797V23.7617C158.254 28.7109 158.285 33.6602 158.254 38.6055C158.188 47.4297 154.492 54.5508 147.637 59.8398C140.649 65.2461 133.402 70.3086 126.262 75.5234C126.008 75.7109 125.742 75.8828 125.27 76.2109C125.164 75.7031 125.094 75.1875 125.059 74.668C125.059 67.6641 124.949 60.6562 125.078 53.6562C125.238 45.2734 128.539 38.2109 135.094 33.0586C142.395 27.3203 150.012 21.9883 157.496 16.4883C157.742 16.3672 157.996 16.2617 158.254 16.1797Z"
fill="#438E86"
/>
<path
d="M118.957 45.5977L113.578 41.6523C110.016 39.043 106.434 36.457 102.883 33.8242C97.1992 29.5977 94.3281 23.9297 94.332 16.8125V3.13281C94.332 2.50391 94.332 1.87891 94.332 0.984375C94.8125 1.16406 95.2774 1.38281 95.7188 1.64062C100.688 5.25781 105.688 8.83594 110.59 12.543C115.113 15.9609 118 20.457 118.852 26.1602C118.965 26.7227 119.035 27.293 119.062 27.8711C119.082 33.332 119.094 38.793 119.09 44.25C119.09 44.5586 119.031 44.8672 118.957 45.5977Z"
fill="#438E86"
/>
<path
d="M11.3774 127.295V132.295C13.522 128.724 16.9478 126.935 21.6587 126.935C25.5532 126.935 28.7095 128.24 31.1274 130.842C33.5415 133.435 34.7524 136.967 34.7524 141.435V161.279H24.4087V142.826C24.4087 140.638 23.8228 138.947 22.6587 137.748C21.5024 136.552 19.9087 135.951 17.8774 135.951C15.854 135.951 14.2681 136.552 13.1118 137.748C11.9556 138.947 11.3774 140.638 11.3774 142.826V161.279H0.955566V127.295H11.3774Z"
fill="#438E86"
/>
<path
d="M67.0403 127.295V133.638C69.4661 129.17 72.7122 126.935 76.7747 126.935V137.529H74.2278C71.8293 137.529 70.0325 138.099 68.8372 139.232C67.6379 140.369 67.0403 142.357 67.0403 145.201V161.279H56.6184V127.295H67.0403Z"
fill="#438E86"
/>
<path
d="M77.8701 127.295H88.9482L96.6826 152.576L104.417 127.295H115.495L103.433 161.279H89.917L77.8701 127.295Z"
fill="#438E86"
/>
<path
d="M138.751 150.513C140.251 149.045 141.001 146.974 141.001 144.295C141.001 141.619 140.251 139.56 138.751 138.123C137.251 136.677 135.524 135.951 133.579 135.951C131.63 135.951 129.907 136.681 128.407 138.138C126.907 139.599 126.157 141.67 126.157 144.357C126.157 147.037 126.907 149.099 128.407 150.545C129.907 151.982 131.63 152.701 133.579 152.701C135.524 152.701 137.251 151.974 138.751 150.513ZM120.048 156.842C117.048 153.592 115.548 149.431 115.548 144.357C115.548 139.287 117.048 135.115 120.048 131.842C123.055 128.572 126.723 126.935 131.048 126.935C135.368 126.935 138.688 128.541 141.001 131.748V127.295H151.423V161.279H141.001V156.342C138.489 159.916 135.118 161.701 130.891 161.701C126.673 161.701 123.055 160.084 120.048 156.842Z"
fill="#438E86"
/>
<path
d="M168.718 127.295V132.295C170.863 128.724 174.289 126.935 179 126.935C182.894 126.935 186.05 128.24 188.468 130.842C190.882 133.435 192.093 136.967 192.093 141.435V161.279H181.75V142.826C181.75 140.638 181.164 138.947 180 137.748C178.843 136.552 177.25 135.951 175.218 135.951C173.195 135.951 171.609 136.552 170.453 137.748C169.296 138.947 168.718 140.638 168.718 142.826V161.279H158.296V127.295H168.718Z"
fill="#438E86"
/>
<path
d="M219.37 150.513C220.87 149.045 221.62 146.974 221.62 144.295C221.62 141.619 220.87 139.56 219.37 138.123C217.87 136.677 216.143 135.951 214.198 135.951C212.249 135.951 210.526 136.681 209.026 138.138C207.526 139.599 206.776 141.67 206.776 144.357C206.776 147.037 207.526 149.099 209.026 150.545C210.526 151.982 212.249 152.701 214.198 152.701C216.143 152.701 217.87 151.974 219.37 150.513ZM200.667 156.842C197.667 153.592 196.167 149.431 196.167 144.357C196.167 139.287 197.667 135.115 200.667 131.842C203.674 128.572 207.342 126.935 211.667 126.935C215.987 126.935 219.307 128.541 221.62 131.748V127.295H232.042V161.279H221.62V156.342C219.108 159.916 215.737 161.701 211.51 161.701C207.292 161.701 203.674 160.084 200.667 156.842Z"
fill="#438E86"
/>
<path
d="M55.172 105.619C56.454 104.173 58.666 104.039 60.1127 105.321C61.5594 106.603 61.6929 108.815 60.4109 110.262L50.5603 121.378C49.2783 122.825 47.0663 122.958 45.6196 121.676C44.1729 120.394 44.0394 118.182 45.3214 116.736L55.172 105.619Z"
fill="#438E86"
/>
<path
d="M40.077 126.98L50 127.002L49.923 160.874L40 160.852L40.077 126.98Z"
fill="#438E86"
/>
</svg>
);
}
-7
View File
@@ -1,7 +0,0 @@
import { API } from "./preload";
export {};
declare global {
interface Window {
API: typeof API;
}
}
-7
View File
@@ -1,7 +0,0 @@
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
Arial, sans-serif;
margin: auto;
max-width: 38rem;
padding: 2rem;
}
-12
View File
@@ -1,12 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World!</title>
</head>
<body>
<h1>💖 Hello World!</h1>
<p>Welcome to your Electron application.</p>
</body>
</html>
-53
View File
@@ -1,53 +0,0 @@
import { BrowserWindow, app } from "electron";
// This allows TypeScript to pick up the magic constant that's auto-generated by Forge's Webpack
// plugin that tells the Electron app where to look for the Webpack-bundled app code (depending on
// whether you're running in development or production).
declare const MAIN_WINDOW_WEBPACK_ENTRY: string;
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (require("electron-squirrel-startup")) {
// eslint-disable-line global-require
app.quit();
}
const createWindow = (): void => {
// Create the browser window.
const mainWindow = new BrowserWindow({
height: 600,
width: 800,
webPreferences: {
preload: MAIN_WINDOW_WEBPACK_ENTRY,
}, // use a preload script
});
// and load the index.html of the app.
mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY);
// Open the DevTools.
mainWindow.webContents.openDevTools();
};
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on("ready", createWindow);
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
app.quit();
}
});
app.on("activate", () => {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and import them here.
@@ -1,64 +0,0 @@
import {
Add,
CardGiftcardRounded,
ContactsRounded,
LinkRounded,
PushPinRounded,
} from "@mui/icons-material";
import Logo, { LogoType } from "../../components/Logo";
export default function Home() {
return (
<div className="h-screen w-screen bg-slate-700">
{/* header */}
<div className="flex flex-row items-center bg-slate-800 h-20">
<Logo type={LogoType.small} className="scale-[0.4]" />
<input
placeholder="type / to search"
className="placeholder:text-slate-400 bg-transparent outline-none text-slate-100"
/>
<button className="ml-auto hover:scale-110 bg-slate-600 text-teal-500 py-1 px-2 rounded-lg text-sm">
flow state
</button>
<span className="relative mx-5">
<img
src="https://lh3.googleusercontent.com/a-/AOh14Gjm29Sd1Wnm8NvZbXkosvf6SoID6kBP5OHRLVIOBQ=s96-c"
className="rounded-lg h-8 hover:bg-slate-200 hover:cursor-pointer hover:scale-110"
alt="cannot find"
/>
<span className="absolute bottom-0 -right-1.5 rounded-full bg-emerald-600 h-3 w-3"></span>
</span>
</div>
{/* actions navbar */}
<div className="flex justify-end mx-10 mt-5 space-x-3">
<span className="hover:bg-slate-500 p-1 rounded-full cursor-pointer flex justify-center items-center">
<ContactsRounded className="text-slate-100" fontSize="small" />
</span>
<span className="hover:bg-slate-500 p-1 rounded-full cursor-pointer flex justify-center items-center">
<LinkRounded className="text-slate-100" fontSize="small" />
</span>
<span className="hover:bg-slate-500 p-1 rounded-full cursor-pointer flex justify-center items-center">
<CardGiftcardRounded className="text-pink-100" fontSize="small" />
</span>
<span className="hover:bg-slate-500 p-1 rounded-full cursor-pointer flex justify-center items-center">
<Add className="text-slate-100" fontSize="small" />
</span>
</div>
{/* pinned conversations */}
<div className="m-5 bg-slate-500 shadow-lg rounded">
<span className="flex flex-row justify-start p-4 items-center">
<PushPinRounded className="text-slate-100" />
<span className="tracking-wider text-slate-100 uppercase text-sm font-semibold">
Pinned
</span>
</span>
</div>
</div>
);
}
@@ -1,47 +0,0 @@
import { Button, CircularProgress } from "@mui/material";
import { useEffect, useState } from "react";
import Logo from "../../components/Logo";
import { UserInfo } from "@nirvana/core/models";
import { channels } from "../../shared/constants";
import { useNavigate } from "react-router-dom";
export default function Login() {
const navigate = useNavigate();
const logIn = () => {
// send to main process
// window.API.send(channels.ACTIVATE_LOG_IN);
};
useEffect(() => {
// .API.receive(channels.AUTH_TOKEN, async (accessToken: string) => {
// console.log(accessToken);
// // get user info from access token
// const userInfo: UserInfo = await (
// await fetch(
// `https://www.googleapis.com/oauth2/v1/userinfo?access_token=${accessToken}`
// )
// ).json();
// console.log("user data: ");
// console.log(userInfo);
// // if user is a user, then continue to next route
// navigate("/home");
// // if user is not an existing user, then show create account page
// });
// return () => {
// ipcRenderer.removeAllListeners(channels.AUTH_TOKEN);
// };
}, []);
return (
<div className="container flex flex-col space-y-5 justify-center items-center h-screen bg-slate-900">
<Logo className="scale-50" />
<CircularProgress />
<Button onClick={logIn} variant="contained">
Sign In
</Button>
</div>
);
}
@@ -1,3 +0,0 @@
export default function Profile() {
return <span>this is the profile page</span>;
}
-15
View File
@@ -1,15 +0,0 @@
import { contextBridge, ipcRenderer } from "electron";
const API = {
notificationApi: {
sendNotification() {
ipcRenderer.send("notify", "message");
},
},
batteryApi: {},
fileApi: {},
};
contextBridge.exposeInMainWorld("electron", API);
export default API;
-35
View File
@@ -1,35 +0,0 @@
/**
* This file will automatically be loaded by webpack and run in the "renderer" context.
* To learn more about the differences between the "main" and the "renderer" context in
* Electron, visit:
*
* https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes
*
* By default, Node.js integration in this file is disabled. When enabling Node.js integration
* in a renderer process, please be aware of potential security implications. You can read
* more about security risks here:
*
* https://electronjs.org/docs/tutorial/security
*
* To enable Node.js integration in this file, open up `main.js` and enable the `nodeIntegration`
* flag:
*
* ```
* // Create the browser window.
* mainWindow = new BrowserWindow({
* width: 800,
* height: 600,
* webPreferences: {
* nodeIntegration: true
* }
* });
* ```
*/
import "./index.css";
import "./app";
console.log(
'👋 This message is being logged by "renderer.js", included via webpack'
);
@@ -1,6 +0,0 @@
module.exports = {
channels: {
ACTIVATE_LOG_IN: "ACTIVATE_LOG_IN",
AUTH_TOKEN: "AUTH_TOKEN",
},
};
-19
View File
@@ -1,19 +0,0 @@
{
"compilerOptions": {
"allowJs": true,
"module": "commonjs",
"skipLibCheck": true,
"esModuleInterop": true,
"noImplicitAny": true,
"sourceMap": true,
"baseUrl": ".",
"outDir": "dist",
"moduleResolution": "node",
"resolveJsonModule": true,
"paths": {
"*": ["node_modules/*"]
},
"jsx": "react-jsx"
},
"include": ["src/**/*"]
}
-14
View File
@@ -1,14 +0,0 @@
module.exports = {
/**
* This is the main entry point for your application, it's the first file
* that runs in the main process.
*/
entry: './src/index.ts',
// Put your normal webpack config below here
module: {
rules: require('./webpack.rules'),
},
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
},
};
-3
View File
@@ -1,3 +0,0 @@
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
module.exports = [new ForkTsCheckerWebpackPlugin()];
@@ -1,17 +0,0 @@
const rules = require('./webpack.rules');
const plugins = require('./webpack.plugins');
rules.push({
test: /\.css$/,
use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
});
module.exports = {
module: {
rules,
},
plugins: plugins,
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css'],
},
};
-29
View File
@@ -1,29 +0,0 @@
module.exports = [
// Add support for native node modules
{
// We're specifying native_modules in the test because the asset relocator loader generates a
// "fake" .node file which is really a cjs file.
test: /native_modules\/.+\.node$/,
use: 'node-loader',
},
{
test: /\.(m?js|node)$/,
parser: { amd: false },
use: {
loader: '@vercel/webpack-asset-relocator-loader',
options: {
outputAssetBase: 'native_modules',
},
},
},
{
test: /\.tsx?$/,
exclude: /(node_modules|\.webpack)/,
use: {
loader: 'ts-loader',
options: {
transpileOnly: true,
},
},
},
];
+71 -2316
View File
File diff suppressed because it is too large Load Diff