mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
refactor: use standard dist directory for vite build output
This commit is contained in:
+1
-1
@@ -146,7 +146,7 @@ dev-dist
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
# (using dist, already ignored above)
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
+3
-3
@@ -94,7 +94,7 @@ const createMainWindow = () => {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
devTools: true, // TODO: change to isDev when no bugs left
|
||||
preload: path.join(dirname, '../build/electron/preload.cjs'),
|
||||
preload: path.join(dirname, '../dist/electron/preload.cjs'),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -140,7 +140,7 @@ const createMainWindow = () => {
|
||||
callback({ responseHeaders: details.responseHeaders });
|
||||
});
|
||||
|
||||
const startURL = isDev ? 'http://localhost:3000' : `file://${path.join(dirname, '../build/index.html')}`;
|
||||
const startURL = isDev ? 'http://localhost:3000' : `file://${path.join(dirname, '../dist/index.html')}`;
|
||||
|
||||
mainWindow.loadURL(startURL);
|
||||
|
||||
@@ -244,7 +244,7 @@ const createMainWindow = () => {
|
||||
|
||||
if (process.platform !== 'darwin') {
|
||||
// tray
|
||||
const trayIconPath = path.join(dirname, '..', isDev ? 'public' : 'build', 'electron-tray-icon.png');
|
||||
const trayIconPath = path.join(dirname, '..', isDev ? 'public' : 'dist', 'electron-tray-icon.png');
|
||||
const tray = new Tray(trayIconPath);
|
||||
tray.setToolTip('5chan');
|
||||
const trayMenu = Menu.buildFromTemplate([
|
||||
|
||||
@@ -16,7 +16,7 @@ export default defineConfig({
|
||||
fileName: () => 'preload.cjs',
|
||||
formats: ['cjs'],
|
||||
},
|
||||
outDir: resolve(__dirname, '../build/electron'),
|
||||
outDir: resolve(__dirname, '../dist/electron'),
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
external: ['electron'],
|
||||
|
||||
+5
-5
@@ -58,7 +58,7 @@
|
||||
"build-netlify": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096\" PUBLIC_URL=./ GENERATE_SOURCEMAP=true VITE_COMMIT_REF=$COMMIT_REF CI='' vite build",
|
||||
"test": "vitest",
|
||||
"preview": "vite preview",
|
||||
"analyze-bundle": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=true vite build && npx source-map-explorer 'build/assets/*.js'",
|
||||
"analyze-bundle": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=true vite build && npx source-map-explorer 'dist/assets/*.js'",
|
||||
"electron": "yarn build:preload && cross-env ELECTRON_IS_DEV=1 yarn electron:before && cross-env ELECTRON_IS_DEV=1 electron .",
|
||||
"electron:no-delete-data": "yarn electron:before:download-ipfs && electron .",
|
||||
"electron:start": "concurrently \"cross-env BROWSER=none yarn start\" \"wait-on http://localhost:3000 && yarn electron\"",
|
||||
@@ -94,8 +94,8 @@
|
||||
"@capacitor/android": "7.2.0",
|
||||
"@capacitor/cli": "7.2.0",
|
||||
"@capacitor/core": "7.2.0",
|
||||
"@react-scan/vite-plugin-react-scan": "^0.1.8",
|
||||
"@electron/rebuild": "4.0.0",
|
||||
"@react-scan/vite-plugin-react-scan": "^0.1.8",
|
||||
"@types/memoizee": "0.4.9",
|
||||
"@typescript-eslint/eslint-plugin": "8.29.0",
|
||||
"@typescript-eslint/parser": "8.29.0",
|
||||
@@ -118,10 +118,10 @@
|
||||
"eslint-plugin-react-compiler": "19.0.0-beta-40c6c23-20250301",
|
||||
"eslint-plugin-react-hooks": "5.2.0",
|
||||
"husky": "4.3.8",
|
||||
"react-grab": "^0.0.18",
|
||||
"react-scan": "^0.4.3",
|
||||
"isomorphic-fetch": "3.0.0",
|
||||
"lint-staged": "12.3.8",
|
||||
"react-grab": "^0.0.18",
|
||||
"react-scan": "^0.4.3",
|
||||
"stream-browserify": "3.0.0",
|
||||
"vite": "6.2.1",
|
||||
"vite-plugin-eslint": "1.8.1",
|
||||
@@ -149,7 +149,7 @@
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
"build/**/*",
|
||||
"dist/**/*",
|
||||
"electron/**/*",
|
||||
"package.json",
|
||||
"node_modules/**/*"
|
||||
|
||||
+1
-1
@@ -176,7 +176,7 @@ export default defineConfig({
|
||||
}
|
||||
},
|
||||
build: {
|
||||
outDir: 'build',
|
||||
outDir: 'dist',
|
||||
emptyOutDir: true,
|
||||
sourcemap: process.env.GENERATE_SOURCEMAP === 'true',
|
||||
target: process.env.ELECTRON ? 'electron-renderer' : 'modules',
|
||||
|
||||
Reference in New Issue
Block a user