Commit graph

3479 commits

Author SHA1 Message Date
JJ Kasper
60af68f782 Update to render directly to body in AMP mode (#7151) 2019-04-25 10:14:52 +02:00
JJ Kasper
4fefa2e4f2 Add stale-while-revalidate when no getInitialProps (#7149)
* Add stale-while-revalidate when no getInitialProps

* Make sure setHeader exists
2019-04-25 10:11:05 +02:00
JJ Kasper
644e958d83
v8.1.1-canary.10 2019-04-24 17:08:40 -05:00
JJ Kasper
3666843e68
Remove type defs for non-ts files and fix wrong import for router in _app (#7150) 2019-04-24 17:06:41 -05:00
JJ Kasper
70942050b7
v8.1.1-canary.9 2019-04-24 16:05:58 -05:00
JJ Kasper
92e2f26999
Remove list_dist from debugging (#7148) 2019-04-24 16:04:37 -05:00
JJ Kasper
d80aea45ae
v8.1.1-canary.8 2019-04-24 15:44:26 -05:00
JJ Kasper
c0ee49b4fb
Move type generating (#7147)
* Move types to run on prepublish in each package

* Update circleci to list dist
2019-04-24 15:43:04 -05:00
Connor Davis
463c8435c5
v8.1.1-canary.7 2019-04-24 15:03:21 -05:00
Connor Davis
ef7c22385a
Replace --target serverless with env var (#7146) 2019-04-25 04:16:30 +09:00
JJ Kasper
9aced1788e Move generating types to before deploy (#7145)
* Move generating types to before deploy

* Indent again

* Re-add type generating to prepublish
2019-04-24 20:41:07 +02:00
Connor Davis
8582366aa5 Add --target serverless flag (#7141) 2019-04-24 20:32:15 +02:00
JJ Kasper
b21ebaa8e1
Don't re-use the same page file for error-recovery tests (#7144)
* Don't re-use the same page file for error-recovery tests

* bump

* bump
2019-04-24 13:19:26 -05:00
Joe Haddad
0c3018c6ce
A webpack bug is preventing us from hashing chunks (#7142) 2019-04-25 01:50:29 +09:00
Joe Haddad
0138ef090a
Remove old debugging logs (#7139) 2019-04-25 01:01:56 +09:00
Joe Haddad
ba0a28ff3f
v8.1.1-canary.6 2019-04-24 11:20:24 -04:00
Joe Haddad
477bdb9299
TypeScript preset should always be enabled (#7137)
The preset handles file toggling itself, and actually changes behavior between `.ts` and `.tsx`.
2019-04-25 00:10:27 +09:00
Martin Šťovíček
05e525443b Always use AllModulesIdentifiedPlugin after HashedModuleIdsPlugin (#7138)
Remove selectivePageBuilding check during build.

Fixes #7109
2019-04-25 00:09:39 +09:00
Tim Neutkens
8f8e7cfb1c v8.1.1-canary.5 2019-04-24 16:51:16 +02:00
Tim Neutkens
c9d599b698
Add .d.ts for next-server (#7133)
* Add .d.ts files

* Drop next declarations from index.d.ts

* Bring back number of errors

* Fix more errors

* Fix rewriteUrlForExport
2019-04-24 16:47:50 +02:00
Sebastian Benz
7a16379435 Upgrade amp-optimizer to 0.5.3 (#7134) 2019-04-24 08:46:16 -05:00
Tim Neutkens
09717e0456 v8.1.1-canary.4 2019-04-24 11:35:30 +02:00
Joe Haddad
8cd21a6368 Server file inclusive Flying Shuttle (#7128)
* Add Flying Shuttle plugin to server compilation

* Ignore build artifacts in flying shuttle manifest

* Add comments explaining what's going on

* Emit Shuttle manifest after both compilations
2019-04-24 11:04:36 +02:00
Connor Davis
3fa04620e7 Remove Deploy To Now buttons (#7126)
* Remove Deploy To Now buttons

* Remove remaining buttons
2019-04-24 10:53:58 +02:00
JJ Kasper
a320dc10f6 Add AMP label to AMP only pages in build tree (#7123) 2019-04-24 10:48:43 +02:00
Luis Fernando Alvarez D
68e41ed38f
Updated broken test in Windows (#7124) 2019-04-23 17:05:42 -05:00
Luis Fernando Alvarez D
254b23eb07
Add declaration files to /dist (#7118) 2019-04-23 16:12:33 -05:00
Tim Neutkens
498ec618cb v8.1.1-canary.3 2019-04-23 11:54:52 +02:00
Tim Neutkens
c79558328e
Add Typescript compilation (#7110) 2019-04-23 11:54:08 +02:00
chuck
78783477e0 More Specific Info on Script Loading Error (#7108)
* add url info on script loading error message

* Update packages/next/client/page-loader.js

shorten error message for smaller bundle size

Co-Authored-By: chuck0523 <chuckinthestar@gmail.com>
2019-04-23 11:29:52 +02:00
Tim Neutkens
4d8a9fd8bb v8.1.1-canary.2 2019-04-23 09:40:24 +02:00
Joe Haddad
2b7ca40622 Revert "Detect built ins in externals (#7083)" (#7107)
This reverts commit f8978cc29c.
2019-04-23 09:09:48 +02:00
Luis Fernando Alvarez D
08a6066681 Replace the typescript compiler with @babel/preset-typescript (#7016)
* Added babel typescript for the core files

* Add __NEXT_VERSION

* Added noop.js to the babel taskfile

* Only include dynamic-import-node for the bin task

* Added babel-plugin-dynamic-import-node

* Use loose option to prevent Object.defineProperty

* Enable loose in preset and enable compact mode

* Disable compact and loose to compare

* Re-enable compact and loose
2019-04-23 09:05:49 +02:00
Luis Fernando Alvarez D
db5b3dc8e3
Update types for with-router (#7106)
* Updated declarations for with-router
2019-04-22 17:32:10 -05:00
Rhys Arkins
baabfbd777 fix: add repository to next-server package.json (#7105) 2019-04-22 21:33:28 +02:00
Tim Neutkens
c0a10b9960
Wait for entry to resolve in production build (#7104)
* Wait for entry to resolve in production build

* Return promise
2019-04-22 20:57:02 +02:00
Jeremy Bolding
d2b0db811c Rewrote .circleci/config.yml to 2.1 schema (#7103) 2019-04-22 20:21:42 +02:00
Luis Fernando Alvarez D
29f71bfcba Add more TypeScript types (#7054)
* 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
2019-04-22 19:55:03 +02:00
Pierre de la Martinière
be4026f48f Make next export respect experimental.exportTrailingSlash (#6752)
* Add --no-subfolders argument to next export

* Use experimental.exportTrailingSlash instead of a cli flag

* Add experimental.exportTrailingSlash documentation

* Add tests for export with experimental.exportTrailingSlash

* Remove docs

* Remove comment
2019-04-23 01:55:03 +09:00
Joe Haddad
87f60f56dd
v8.1.1-canary.1 2019-04-22 12:26:26 -04:00
Joe Haddad
597138f359
Cache Babel and AutoDll plugin in dirDir/cache (#7102)
* Cache Babel and AutoDll plugin in `dirDir/cache`

* Extract code
2019-04-23 01:16:42 +09:00
JJ Kasper
bc1e088b73 Make styles compatible in AMP mode (#7060)
* Make styles compatible in AMP mode

* bump

* Update to parse styles from fragment for
backwards compat in AMP mode

* Add test for AMP styles fragment support
2019-04-23 00:32:46 +09:00
JJ Kasper
80210bc31a Update removing AMP pages to not require during build (#7081)
* Update to use babel plugin with webpack plugin to
remove AMP client bundles since they are not used

* Remove acorn dependency since it isn't used
2019-04-22 06:25:17 +09:00
Tim Neutkens
bcf6918bc3 v8.1.1-canary.0 2019-04-21 23:22:30 +02:00
Joe Haddad
f5be84e4ff Upgrade Terser (#6981)
The new version of Terser seems to be significantly slower than the previous.  I wanted to see what our stats PR says.
2019-04-22 06:03:57 +09:00
JJ Kasper
a27c235260 Update to share HMR and ondemand SSE connection (#7084)
We also close the connection when the window is in the background and re-connect when it is brought to the foreground. This prevents us from using up too many connections.
2019-04-22 05:51:09 +09:00
Luis Fernando Alvarez D
08937807f6 Remove dynamic-import-node from the preset (#7096)
Related to [this spectrum post](https://spectrum.chat/next-js/general/next-8-minor-update-breaks-dynamic-import-in-jest-tests~1e7b58e7-e301-4ef9-9de4-eef6ed3639d4).

I'm not removing the `babel-plugin-dynamic-import-node` package as it's going to be used by #7016
2019-04-22 05:25:48 +09:00
Fredrik Höglund
54e45eb74d Export 404 even if undefined in exportPathMap (#6912)
This PR adds the `_error`-page as an `404.html`-export, even when it is not explicitly defined in a custom `exportPathMap`.

It also fixes two false negative tests related to this. Previously the tests were matching the fallback 404-page from the test-server, rather than the `404.html`-page from next, which was actually not being generated. The test server is also not set up to serve `/404.html` as `/404` which the tests now reflect.

**Caveat**

In its current state, this PR removes `/404.html` from the `defaultPathMap` passed to the custom `exportPathMap`-functions, since it instead adds it after that function is run. While it is possible that someone is relying on this to exist, it is to my knowledge undocumented and also unlikely to be used for anything but merging it into the custom pathMap.

Since this would now merge `undefined` which would result in it being added later on anyway, I deemed it safe, but would be happy to undo that part of the PR if necessary as it was only cleanup.

**Examples**

As a way to demonstrate what this PR does, this is how examples changed:

* `basic-export` - Behaviour is unchanged, still has a `404.html`
* `with-static-export` - Now has a `404.html`
2019-04-22 05:24:28 +09:00
JJ Kasper
d9a6f1ca77 Move react-ssr-prepass import inside of (#7095)
ampBindInitData check
2019-04-22 03:47:02 +09:00
Connor Davis
f8978cc29c Detect built ins in externals (#7083) 2019-04-20 10:44:39 +09:00