1. 13 12月, 2018 2 次提交
    • T
      Convert render.js to typescript (#5869) · 5e3bf6e5
      Tim Neutkens 提交于
      * Convert render.js to typescript
      
      * Compile tsx files too
      
      * Remove internal renderErrorToHTML function
      
      * Interopt component result
      
      * requirePage doesn’t need async
      
      * Move out enhancing logic into it’s own function
      
      * Remove buildManifest from renderPage
      
      * Move render into it’s own function
      
      * Change let to const
      
      * Move renderDocument into it’s own function
      5e3bf6e5
    • A
      Removing link ref style.css (#5871) · 81a2a6c4
      adrianoted 提交于
      This link ref is no more necessary to include in the Head Section.  It cause error 404 in the console: http://localhost:3000/_next/static/style.css net::ERR_ABORTED 404 (Not Found)
      81a2a6c4
  2. 12 12月, 2018 7 次提交
    • B
      multi-threaded export with nice progress indication (#5870) · e6c36866
      Benjamin Kniffler 提交于
      This PR will
      
      - allow nextjs export to use all available CPU cores for rendering & writing pages by using child_process
      - make use of async-sema to allow each thread to concurrently write multiple paths
      - show a fancy progress bar while processing pages (with non-TTY fallback for CI web consoles)
      
      The performance gain for my MacBook with 4 CPU cores went from ~25 pages per second to ~75 pages per second. Beefy CI machines with lots of cores should profit even more.
      e6c36866
    • O
      Fix/update "examples/custom-server-typescript" (#5865) · 71d1d363
      Oscar Busk 提交于
      * Update all dependencies and remove redundant ones from package.json. (60f9ee5)
      * Fixes #5596 by adjusting nodemon scripts (d4b7d3a)
      * Fixes `npm start` on windows by using `cross-env` (9555217)
      * Move compiled server out from `.next`. Compiling other JS into `.next` seems incorrect. (79fce02, 
      9ce7086)
      * Partly fixes #5753 by making sure typescript compiles with `es2017` as target, at least ensuring code is runnable on node 8. Previously it was compiled with `esnext`. (9176e92)
      
      --- 
      
      I tried improving the structure by keeping source in `src/app` and `src/server` and then building to `dist/server` and `dist/app` but I didn't really get it to work and made most configs more complicated. Moved the built server out from `.next` anyway.
      71d1d363
    • B
      Fix initialNow in react-intl example (#5867) · 50662c6a
      Brian Beck 提交于
      The `initialNow` prop is used to avoid content mismatches when Universal/SSR apps render date values using components like `<FormattedRelative>`.
      
      If this value is created in `render()`, then the server will generate it and then the client will also generate it during hydration / initial render, resulting in two different values and content mismatches like:
      
      > Warning: Text content did not match. Server: "in 1,741,545 seconds" Client: "in 1,741,543 seconds"
      
      If the value is instead generated in `getInitialProps`, then the client's initial rendering will match because it will use the same value sent down by the server.
      50662c6a
    • O
      Update/fix "examples/with-firebase-hosting-and-typescript" (#5864) · 4345343d
      Oscar Busk 提交于
      There were several issues with the example [examples/with-firebase-hosting-and-typescript](https://github.com/zeit/next.js/tree/canary/examples/with-firebase-hosting-and-typescript)
      * `npm run serve`
        * Has no `pre` task that actually builds the app. Requires manual running of all build scripts.
        * Will choke on windows because trying to set environment variables with `NODE_ENV=production`
      * Outdated Typescript and Tslint
      * Not being able to deploy because `firebase-tools` being of a deprecated version.
      * Structure, which I understand is based on `firebase-tools` generation, is confising with `src/functions/src` being generally bad structuring.
      
      I remedied this and also improved some other factors:
      
      * Remove dependency `prettier` as it is unused (f4d6f54)
      * Upgrade all dependencies (09a9193)
        * Use upgraded firebase dependencies to deploy to node 8 environment (87e1e09, 7d8055b)
        * Remove deprecated tslint rule `no-unused-variable` (9392162)
      * Flattened filestructure in `src/functions` (097a25a)
      * Use ES import when importing next (6c99adb)
      * Fixed incorrect name and added somewhat to the description in package.json.
        `with-firebase-hosting` → `with-firebase-hosting-and-typescript` (1ffa0b5)
      * Fixed `serve` script by building before running, using [`cross-env`](https://www.npmjs.com/package/cross-env) to set environment variables and remove unecessary flag. (3a1e221, 422ccee, 8811e44)
      * Add `.firebase` cache to `.gitignore` (4d7cbe4)
      * Add `-C` (clean) flag when copying dependency files `copy-deps` (0826708)
      * Use `strict: true` in the functions tsconfig (229b04f)
      
      This was tested by running serve on windows and linx(WSL) and deploy on linux(WSL)
      
      ---
      
      This is based on #5819 but correctly based from `canary`
      4345343d
    • K
      Upgrade React from 16.4.2 to 16.6.3 (#5861) · d58cecc9
      Kyle Holmberg 提交于
      * Upgrade React version
      
      * Update size-limit test to account for React change
      d58cecc9
    • T
      v7.0.2-canary.42 · 2dec1fcd
      Tim Neutkens 提交于
      2dec1fcd
    • T
      5708e99e
  3. 11 12月, 2018 5 次提交
  4. 10 12月, 2018 8 次提交
    • D
      Added a new example with relay modern and a graphql server with express. (#4670) · a996fba0
      Diogo Dutra 提交于
      * Added a new example with relay modern and a graphql server with express.
      
      * removed .graphqlconfig file from with-relay-modern-server-express example
      a996fba0
    • S
      Create with-firebase-hosting-and-docker example (#5373) · 2fdd43c3
      Saro Vindigni 提交于
      * ADD with-firebase-hosting-and-docker example
      
      * Improve doc
      2fdd43c3
    • L
      update styletron example (#5573) · 9ddc1d7b
      Leon 提交于
      9ddc1d7b
    • O
      Fix paths when built on windows (#5795) · 27c0b199
      Oscar Busk 提交于
      This PR Fixes #4920
      
      So the problem is that when a next.js application is built on windows, the `pages-manifest.json` file is created with backslashes. If this built application is deployed to a linux hosting enviroment, the server will fail when trying to load the modules.
      
      ```
      Error: Cannot find module '/user_code/next/server/bundles\pages\index.js
      ```
      
      My simple solution is to modify the `pages-manifest.json` to always use linux separator (`/`), then also
      modify `server/require.js` to, when requiring page, replace any separator (`\` or `/`) with current platform-specific file separator (`require('path').sep`).
      
      The fix in `server/require.js` would be sufficient, but my opinion is that having some cross-platform consistency is nice.
      
      This change was tested by bulding an application in windows and running it in linux and windows, aswell as building an application in linux and running it in linux and windows. The related tests was also run.
      # Conflicts:
      #	test/integration/production/test/index.test.js
      27c0b199
    • J
      Use more recent version of svg plugin (#5788) · 6a751182
      Justin Stahlman 提交于
      The demo did not work. Updating to babel-plugin-inline-react-svg v1.0.1 did work.
      6a751182
    • M
      Update for use with Firestore (#5793) · b0148cf4
      moflo 提交于
      Google seems to be deprecated the legacy realtime database and moving towards default use of Firestore, although it's still officially in beta. This PR migrates towards Firestore and the recommended loading methods for the Firebase 5.6.0 libraries. Note: the Firebase and Firebase-Admin dependencies should be updated to 5.6.0 and 6.3.0 respectively.
      b0148cf4
    • B
      improved ant-design with less (#5847) · 77d5f36e
      Bill Searle 提交于
      Hey @timneutkens I've updated this example a bit.
      
      - Fixed `/asserts` spelling to `/assets`.
      - Removed the `/assets/styles.less` as importing this caused the entire ant-design css sheet to be loaded, now only the React components imported will have their styles loaded via the babel plugin which was already configured. Resulted in dropping the CSS for this example from ~630kb to ~220kb.
      - Removed `index.js` as it's not needed.
      77d5f36e
    • T
      Convert next-server.js to typescript (#5844) · 8b617391
      Tim Neutkens 提交于
      8b617391
  5. 08 12月, 2018 1 次提交
  6. 07 12月, 2018 5 次提交
  7. 06 12月, 2018 7 次提交
  8. 05 12月, 2018 5 次提交