- 31 3月, 2020 14 次提交
-
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
由 Guy Bedford 提交于
-
- 26 3月, 2020 1 次提交
-
-
由 JJ Kasper 提交于
* Add initial support for new env config file * Fix serverless processEnv call when no env is provided * Add missing await for test method * Update env config to .env.json and add dotenv loading * ncc dotenv package * Update type * Update with new discussed behavior removing .env.json * Update hot-reloader createEntrypoints * Make sure .env is loaded before next.config.js * Add tests for all separate .env files * Remove comments * Add override tests * Add test for overriding env vars based on local environment * Add support for .env.test * Apply suggestions from code review Co-Authored-By: NJoe Haddad <joe.haddad@zeit.co> * Use chalk for env loaded message * Remove constant as it’s not needed * Update test * Update errsh, taskr, and CNA template ignores * Make sure to only consider undefined missing * Remove old .env ignore * Update to not populate process.env with loaded env * Add experimental flag and add loading of global env values Co-authored-by: NTim Neutkens <timneutkens@me.com> Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
- 18 2月, 2020 1 次提交
-
-
由 Jan Potoms 提交于
* Remove ts-ignore where possible And replace by typecasts * More accurate types * bend cliententries in a correct shape earlier on * comment becomes unnecessary * add webpack overload to allow for the next.js use case * Avoid changing public interface Co-authored-by: NJoe Haddad <timer150@gmail.com>
-
- 08 1月, 2020 1 次提交
-
-
由 Joe Haddad 提交于
* Fix Browserslist Loading * Fix Browserslist Integration for CSS * Add missing file
-
- 11 11月, 2019 1 次提交
-
-
由 Joe Haddad 提交于
* Update `packages/` * Update examples * Update tests * Update bench * Update top level files * Fix build * trigger
-
- 05 10月, 2019 1 次提交
-
-
由 Joe Haddad 提交于
* Convert Dev Server to TypeScript This converts the Next.js Development Server to TypeScript in prep for upcoming changes. * Convert remaining necessary * Fix some type errors * Adjust types
-
- 19 9月, 2019 1 次提交
-
-
由 Joe Haddad 提交于
* Reduce Install Size This should shave a decent amount off our install size. * Fix CSS source map emitting * Fix generation * Enable source maps for testing purposes * Disable double comment * Fix test regex
-
- 04 9月, 2019 1 次提交
-
-
由 Tim Neutkens 提交于
* Initial move * Make emitting work * Update paths * Remove leftover files * Add correct externals configuration * Import correct path * Update path to work with ts-server test * Update lib directory * Compile next-server/lib
-
- 30 8月, 2019 1 次提交
-
-
由 Joe Haddad 提交于
* Add anonymous telemetry * Fix types * Remove semver package * Rename build time variable * Track CSS-in-JS solutions * Single retry and 5s timeout
-
- 24 6月, 2019 1 次提交
-
-
由 Joe Haddad 提交于
This reverts commit e85a517e.
-
- 22 6月, 2019 1 次提交
-
-
由 Guy Bedford 提交于
* Reimplement ncc webpack build This reverts commit 6feca310. * Shared webpack build * ncc workaround pending @zeit/ncc#437 * update ncc * build tweaks, fixup autodll-import * possible Node 8 fix * second possible Node 8 fix * and update taskfile
-
- 29 5月, 2019 1 次提交
-
-
由 Tim Neutkens 提交于
* Run prettier over packages/**/*.js * Run prettier over packages/**/*.ts * Run prettier over examples * Remove tslint * Run prettier over examples * Run prettier over all markdown files * Run prettier over json files
-
- 17 5月, 2019 2 次提交
-
-
由 Tim Neutkens 提交于
* Revert "Add retrying to CircleCi and fixes for ncc'ed webpack (#7366)" This reverts commit 5beb365d. * Revert "ncc Webpack build (#7301)" This reverts commit bd8f3c62. # Conflicts: # packages/next/package.json
-
由 Guy Bedford 提交于
* add back ncc * fixup ncc build
-
- 29 4月, 2019 1 次提交
-
-
由 JJ Kasper 提交于
-
- 27 4月, 2019 1 次提交
-
-
由 Connor Davis 提交于
-
- 25 4月, 2019 1 次提交
-
-
由 Tim Neutkens 提交于
-
- 24 4月, 2019 2 次提交
-
-
由 Tim Neutkens 提交于
* Add .d.ts files * Drop next declarations from index.d.ts * Bring back number of errors * Fix more errors * Fix rewriteUrlForExport
-
由 Luis Fernando Alvarez D 提交于
-
- 23 4月, 2019 1 次提交
-
-
由 Luis Fernando Alvarez D 提交于
* Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document props * Improved types * Fixed some types * Updated AppType * Fixed some tests * Added missing import * Removed a not very useful type * Fix missing type * Move @types/styled-jsx * Fix typescript errors
-
- 16 4月, 2019 1 次提交
-
-
由 Luis Fernando Alvarez D 提交于
Added types to next/router
-
- 02 4月, 2019 1 次提交
-
-
由 Tim Neutkens 提交于
-
- 25 3月, 2019 1 次提交
-
-
由 Tim Neutkens 提交于
More modules to follow.
-
- 24 3月, 2019 1 次提交
-
-
由 Tim Neutkens 提交于
-
- 21 2月, 2019 1 次提交
-
-
由 Connor Davis 提交于
-
- 28 12月, 2018 1 次提交
-
-
由 Tim Neutkens 提交于
**This does not change existing behavior.** building to serverless is completely opt-in. - Implements `target: 'serverless'` in `next.config.js` - Removes `next build --lambdas` (was only available on next@canary so far) This implements the concept of build targets. Currently there will be 2 build targets: - server (This is the target that already existed / the default, no changes here) - serverless (New target aimed at compiling pages to serverless handlers) The serverless target will output a single file per `page` in the `pages` directory: - `pages/index.js` => `.next/serverless/index.js` - `pages/about.js` => `.next/serverless/about.js` So what is inside `.next/serverless/about.js`? All the code needed to render that specific page. It has the Node.js `http.Server` request handler function signature: ```ts (req: http.IncomingMessage, res: http.ServerResponse) => void ``` So how do you use it? Generally you **don't** want to use the below example, but for illustration purposes it's shown how the handler is called using a plain `http.Server`: ```js const http = require('http') // Note that `.default` is needed because the exported module is an esmodule const handler = require('./.next/serverless/about.js').default const server = new http.Server((req, res) => handler(req, res)) server.listen(3000, () => console.log('Listening on http://localhost:3000')) ``` Generally you'll upload this handler function to an external service like [Now v2](https://zeit.co/now-2), the `@now/next` builder will be updated to reflect these changes. This means that it'll be no longer neccesary for `@now/next` to do some of the guesswork in creating smaller handler functions. As Next.js will output the smallest possible serverless handler function automatically. The function has 0 dependencies so no node_modules are required to run it, and is generally very small. 45Kb zipped is the baseline, but I'm sure we can make it even smaller in the future. One important thing to note is that the function won't try to load `next.config.js`, so `publicRuntimeConfig` / `serverRuntimeConfig` are not supported. Reasons are outlined here: #5846 So to summarize: - every page becomes a serverless function - the serverless function has 0 dependencies (they're all inlined) - "just" uses the `req` and `res` coming from Node.js - opt-in using `target: 'serverless'` in `next.config.js` - Does not load next.config.js when executing the function TODO: - [x] Compile next/dynamic / `import()` into the function file, so that no extra files have to be uploaded. - [x] Setting `assetPrefix` at build time for serverless target - [x] Support custom /_app - [x] Support custom /_document - [x] Support custom /_error - [x] Add `next.config.js` property for `target` Need discussion: - [ ] Since the serverless target won't support `publicRuntimeConfig` / `serverRuntimeConfig` as they're runtime values. I think we should support build-time env var replacement with webpack.DefinePlugin or similar. - [ ] Serving static files with the correct cache-control, as there is no static file serving in the serverless target
-
- 16 12月, 2018 1 次提交
-
-
由 DevSide 提交于
This message is from @timneutkens after making changes: - Convert executables to Typescript - Remove `minimist` in favor of `arg` - Implement `--node-args` usage: `--node-args="--throw-deprecation"` - Adds tests for usage of the `next` cli
-