1. 31 Jul, 2020 9 commits
  2. 30 Jul, 2020 13 commits
  3. 29 Jul, 2020 17 commits
  4. 28 Jul, 2020 1 commit
    • laiso's avatar
      Update Electron, Typescript example (#15524) · 2c9c07f9
      laiso authored
      It seems like the error occurs with `next export` when building the current example.
      
      ```
      $ cd examples/with-electron-typescript
      $ yarn && yarn build
      
      Error occurred prerendering page "/detail". Read more: https://err.sh/next.js/prerender-error
      Error: Error for page /detail: pages with `getServerSideProps` can not be exported. See more info here: https://err.sh/next.js/gssp-export
      Error: Export encountered errors on following paths:
              /detail
          at exportApp (/Users/kstg/src/github.com/zeit/next.js/examples/with-electron-typescript/node_modules/next/dist/export/index.js:22:1166)
      error Command failed with exit code 1.   
      ```
      
      I changed routes to statically resolve pages generating from `pages/detail.tsx` and added `getStaticPaths` and `getStaticProps`. so then it will export as follows
      
      ```
      yarn run v1.22.4
      $ next build renderer && next export renderer
      Creating an optimized production build...
      
      Compiled successfully.
      
      Automatically optimizing pages...
      
      Page                            Size     First Load JS
      ┌ ○ /                           336 B          62.6 kB
      ├ ○ /404                        2.54 kB        61.6 kB
      ├ ○ /about                      338 B          62.6 kB
      ├ ● /detail/[id]                440 B          62.7 kB
      ├   ├ /detail/101
      ├   ├ /detail/102
      ├   ├ /detail/103
      ├   └ /detail/104
      └ ● /initial-props              530 B          62.8 kB
      + First Load JS shared by all   59.1 kB
        ├ static/pages/_app.js        983 B
        ├ chunks/commons.9facbe.js    10.9 kB
        ├ chunks/framework.b76773.js  40.3 kB
        ├ runtime/main.800476.js      6.22 kB
        └ runtime/webpack.c21266.js   746 B
      
      λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
      ○  (Static)  automatically rendered as static HTML (uses no initial props)
      ●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
      
      > using build directory: /Users/kstg/src/github.com/zeit/next.js/examples/with-electron-typescript/renderer/.next
        copying "static build" directory
      > No "exportPathMap" found in "next.config.js". Generating map from "./pages"
        launching 7 workers
      Exporting (0/4)
      Exporting (1/4)
      Exporting (2/4)
      Exporting (3/4)
      Exporting (4/4)
      
      Export successful
      Done in 11.47s.
      ```
      2c9c07f9