Skip to content

Commit 2071af8

Browse files
committed
fix app env
1 parent 6fd5761 commit 2071af8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2702
-5441
lines changed

.yarn/install-state.gz

118 KB
Binary file not shown.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@
4141
"@nx/vite": "20.3.3",
4242
"@nx/web": "20.3.3",
4343
"@nx/workspace": "20.3.3",
44+
"lucide-react": "^0.476.0",
4445
"nx": "20.3.3",
45-
"regenerator-runtime": "0.13.7"
46+
"regenerator-runtime": "0.13.7",
47+
"use-immer": "^0.11.0"
4648
},
4749
"devDependencies": {
4850
"@babel/plugin-proposal-decorators": "^7.24.6",
-209 KB
Binary file not shown.

packages/devtools/.yarnrc.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import path from "node:path";
2+
import type { UserConfig } from "vite";
3+
import tsconfigPaths from "vite-tsconfig-paths";
4+
5+
export const config: UserConfig = {
6+
plugins: [
7+
tsconfigPaths({
8+
root: path.resolve(__dirname, "../"),
9+
}),
10+
],
11+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from "vite";
2+
import { config } from "./vite.base.config";
3+
4+
// https://vitejs.dev/config
5+
export default defineConfig(config);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from "vite";
2+
import { config } from "./vite.base.config";
3+
4+
// https://vitejs.dev/config
5+
export default defineConfig(config);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from "vite";
2+
import react from "@vitejs/plugin-react";
3+
// @ts-ignore
4+
import tailwindcss from "@tailwindcss/vite";
5+
6+
import { config } from "./vite.base.config";
7+
8+
config.plugins?.push(react());
9+
config.plugins?.push(tailwindcss());
10+
11+
// https://vitejs.dev/config
12+
export default defineConfig(config);

packages/devtools/forge.config.ts

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
import type { ForgeConfig } from "@electron-forge/shared-types";
22
import { MakerSquirrel } from "@electron-forge/maker-squirrel";
3-
// import { MakerZIP } from "@electron-forge/maker-zip";
3+
import { MakerZIP } from "@electron-forge/maker-zip";
44
import { MakerDeb } from "@electron-forge/maker-deb";
5-
// import { MakerRpm } from "@electron-forge/maker-rpm";
5+
import { MakerRpm } from "@electron-forge/maker-rpm";
66
import { MakerDMG } from "@electron-forge/maker-dmg";
77
import { PublisherGithub } from "@electron-forge/publisher-github";
8-
import { AutoUnpackNativesPlugin } from "@electron-forge/plugin-auto-unpack-natives";
9-
import { WebpackPlugin } from "@electron-forge/plugin-webpack";
108
import { FusesPlugin } from "@electron-forge/plugin-fuses";
119
import { FuseV1Options, FuseVersion } from "@electron/fuses";
10+
import { VitePlugin } from "@electron-forge/plugin-vite";
1211

13-
import { mainConfig } from "./webpack/webpack.main.config";
14-
import { rendererConfig } from "./webpack/webpack.renderer.config";
12+
console.log("forge.config.ts");
13+
console.log("forge.config.ts");
14+
console.log("forge.config.ts");
15+
console.log("forge.config.ts");
16+
console.log("forge.config.ts");
17+
console.log("forge.config.ts");
18+
console.log("forge.config.ts");
1519

1620
const config: ForgeConfig = {
1721
packagerConfig: {
@@ -26,8 +30,8 @@ const config: ForgeConfig = {
2630
authors: "Maciej Pyrc",
2731
setupExe: "hyper-fetch-devtools.exe",
2832
}),
29-
// new MakerZIP({}, ["darwin"]),
30-
// new MakerRpm({}),
33+
new MakerZIP({}, ["darwin"]),
34+
new MakerRpm({}),
3135
new MakerDeb({
3236
options: {
3337
name: "Hyper Fetch Devtools",
@@ -50,24 +54,28 @@ const config: ForgeConfig = {
5054
}),
5155
],
5256
plugins: [
53-
new AutoUnpackNativesPlugin({}),
54-
new WebpackPlugin({
55-
mainConfig,
56-
// TODO: check security policy
57-
devContentSecurityPolicy: "connect-src 'self' * 'unsafe-eval'",
58-
renderer: {
59-
config: rendererConfig,
60-
entryPoints: [
61-
{
62-
html: "./src/app/index.html",
63-
js: "./src/app/renderer.ts",
64-
name: "main_window",
65-
preload: {
66-
js: "./src/app/preload.ts",
67-
},
68-
},
69-
],
70-
},
57+
new VitePlugin({
58+
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
59+
// If you are familiar with Vite configuration, it will look really familiar.
60+
build: [
61+
{
62+
// `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`.
63+
entry: "./src/app/main.ts",
64+
config: "./configs/vite.main.config.mts",
65+
target: "main",
66+
},
67+
{
68+
entry: "./src/app/preload.ts",
69+
config: "./configs/vite.preload.config.mts",
70+
target: "preload",
71+
},
72+
],
73+
renderer: [
74+
{
75+
name: "main_window",
76+
config: "./configs/vite.renderer.config.mts",
77+
},
78+
],
7179
}),
7280
// Fuses are used to enable/disable various Electron functionality
7381
// at package time, before code signing the application

packages/devtools/forge.env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="@electron-forge/plugin-vite/forge-vite-env" />

0 commit comments

Comments
 (0)