diff --git a/README.md b/README.md index d3b04e65..958c06cf 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,36 @@ Run `npm run build`, and nextron outputs packaged bundles under the `dist` folde └── README.md ``` +## `next.config.js` + +```js +// in `./renderer/next.config.js` +module.exports = { + // we need to export static files so as Electron can handle them + output: 'export', + + distDir: + process.env.NODE_ENV === 'production' + ? // we want to change `distDir` to "../app" so as nextron can build the app in production mode! + '../app' + : // default `distDir` value + '.next', + + // e.g. home.html => home/index.html + trailingSlash: true, + + // we need to disable image optimization, because it is not compatible with `{ output: 'export' }` + images: { + unoptimized: true, + }, + + // webpack config for next.js + webpack: (config) => { + return config + }, +} +``` + ## `nextron` or `nextron dev` Options ### `--renderer-port` (default: `8888`) @@ -534,6 +564,7 @@ $ npm link nextron - [andirsun (Anderson Laverde)](https://github.com/andirsun) - [bm777 (Bayang)](https://github.com/bm777) - [FranciscoJBrito (Francisco Brito)](https://github.com/FranciscoJBrito) +- [pixelass (Gregor Adams)](https://github.com/pixelass) For more information, please see [Looking for maintainers ⚡ #244](https://github.com/saltyshiomix/nextron/discussions/244). diff --git a/examples/basic-lang-javascript-python/package.json b/examples/basic-lang-javascript-python/package.json index 0431dc0b..f013d738 100644 --- a/examples/basic-lang-javascript-python/package.json +++ b/examples/basic-lang-javascript-python/package.json @@ -18,7 +18,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1" } diff --git a/examples/basic-lang-javascript/package.json b/examples/basic-lang-javascript/package.json index 0431dc0b..f013d738 100644 --- a/examples/basic-lang-javascript/package.json +++ b/examples/basic-lang-javascript/package.json @@ -18,7 +18,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1" } diff --git a/examples/basic-lang-typescript/package.json b/examples/basic-lang-typescript/package.json index 9720724f..1f86562e 100644 --- a/examples/basic-lang-typescript/package.json +++ b/examples/basic-lang-typescript/package.json @@ -20,7 +20,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.4.5" diff --git a/examples/basic-launch-app-from-url/package.json b/examples/basic-launch-app-from-url/package.json index 9720724f..1f86562e 100644 --- a/examples/basic-launch-app-from-url/package.json +++ b/examples/basic-launch-app-from-url/package.json @@ -20,7 +20,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.4.5" diff --git a/examples/basic-store-data/package.json b/examples/basic-store-data/package.json index 9720724f..1f86562e 100644 --- a/examples/basic-store-data/package.json +++ b/examples/basic-store-data/package.json @@ -20,7 +20,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.4.5" diff --git a/examples/custom-build-options/package.json b/examples/custom-build-options/package.json index 0977e442..a2721555 100644 --- a/examples/custom-build-options/package.json +++ b/examples/custom-build-options/package.json @@ -25,7 +25,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.4.5" diff --git a/examples/custom-renderer-port/package.json b/examples/custom-renderer-port/package.json index 8c497d8d..3adc0c92 100644 --- a/examples/custom-renderer-port/package.json +++ b/examples/custom-renderer-port/package.json @@ -20,7 +20,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.4.5" diff --git a/examples/with-ant-design/package.json b/examples/with-ant-design/package.json index 85f77fb8..aab3216a 100644 --- a/examples/with-ant-design/package.json +++ b/examples/with-ant-design/package.json @@ -22,7 +22,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.4.5" diff --git a/examples/with-chakra-ui/package.json b/examples/with-chakra-ui/package.json index fbffc748..631069a9 100644 --- a/examples/with-chakra-ui/package.json +++ b/examples/with-chakra-ui/package.json @@ -26,7 +26,7 @@ "electron-builder": "^24.13.3", "framer-motion": "^11.0.28", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.4.5" diff --git a/examples/with-emotion/package.json b/examples/with-emotion/package.json index e7ae2703..74975926 100644 --- a/examples/with-emotion/package.json +++ b/examples/with-emotion/package.json @@ -23,7 +23,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.4.5" diff --git a/examples/with-material-ui/package.json b/examples/with-material-ui/package.json index 851d9b40..b8d10874 100644 --- a/examples/with-material-ui/package.json +++ b/examples/with-material-ui/package.json @@ -27,7 +27,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "^5.4.5" diff --git a/examples/with-next-i18next/package.json b/examples/with-next-i18next/package.json index c0d1c431..0932e585 100644 --- a/examples/with-next-i18next/package.json +++ b/examples/with-next-i18next/package.json @@ -23,7 +23,7 @@ "i18next": "^23.11.5", "next": "^14.2.4", "next-i18next": "^15.2.0", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-i18next": "^14.1.2" diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index a47de818..792f1da1 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -21,7 +21,7 @@ "electron": "^31.0.1", "electron-builder": "^24.13.3", "next": "^14.2.4", - "nextron": "^9.0.0", + "nextron": "^9.1.0", "postcss": "^8.4.38", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/package.json b/package.json index 741e1dea..242b3fa5 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { "name": "nextron", - "version": "9.0.0", + "version": "9.1.0", "description": "⚡ NEXT.js + Electron ⚡", - "repository": "git@github.com:saltyshiomix/nextron.git", + "repository": { + "type": "git", + "url": "https://github.com/saltyshiomix/nextron.git" + }, "author": { "name": "Shiono Yoshihide", "email": "shiono.yoshihide@gmail.com",