Skip to content

Commit

Permalink
feat: ChatGPTNextWeb#1000 client-side only and desktop app
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa authored and chenzeyu committed Nov 8, 2023
1 parent f5f7d6a commit 51cc79f
Show file tree
Hide file tree
Showing 25 changed files with 3,698 additions and 14 deletions.
31 changes: 18 additions & 13 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
/** @type {import('next').NextConfig} */
const mode = process.env.BUILD_MODE ?? "standalone";
console.log("[Next] build mode", mode);

/** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"],
});

return config;
},
output: mode,
};

if (mode !== "export") {
nextConfig.rewrites = async () => {
const ret = [
{
source: "/api/proxy/:path*",
Expand Down Expand Up @@ -29,16 +43,7 @@ const nextConfig = {
return {
beforeFiles: ret,
};
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"],
});

return config;
},
output: "standalone",
};
};
}

export default nextConfig;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"husky": "^8.0.0",
"lint-staged": "^13.2.0",
"prettier": "^2.8.7",
"typescript": "4.9.5"
"typescript": "4.9.5",
"@tauri-apps/cli": "^1.3.1"
}
}
3 changes: 3 additions & 0 deletions src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by Cargo
# will have compiled files and executables
/target/
Loading

0 comments on commit 51cc79f

Please sign in to comment.