Commit graph

514 commits

Author SHA1 Message Date
Tim Neutkens
5288aaafbd
Temporarily pass arguments directly (#6876) 2019-04-03 14:51:59 +02:00
yi
3e7f836c28 Added example with react-multi-carousel for rendering items on the server-side (#6820)
* Simplified format function in with-redux (#6518)

* Update README.md (#6749)

- fix runtime configuration example to use `customKey`
- standardize warning callouts to use a block quote and bold "**Warning:**" text. Previously there were different ways a warning was mentioned on the docs page:
  - A warning emoji. The warning emoji didn't render in the actual site. 
    <img width="770" alt="Screen Shot 2019-03-21 at 9 22 21 AM" src="https://user-images.githubusercontent.com/1103708/54759302-c655f380-4bbb-11e9-9116-b0fdc2467bc3.png">
  - Italicized "Warning" text. Imo, does not stand out on the page.
    <img width="663" alt="Screen Shot 2019-03-21 at 9 24 43 AM" src="https://user-images.githubusercontent.com/1103708/54759376-f604fb80-4bbb-11e9-85c6-6589b7738dee.png">

* Adde example on how to rendering muiltiple items carousel on server-side with nextjs
2019-04-03 12:58:59 +02:00
JJ Kasper
b509841f5e Add useRouter hook (#6869)
This introduces the `useRouter` hook alternative to `withRouter`
2019-04-03 11:28:53 +02:00
Joe Haddad
4b44778b67
v8.0.5-canary.2 2019-04-02 21:48:18 -04:00
Joe Haddad
d653216208
Add an experimental debug mode to builds (#6870)
* Add a debug mode to webpack configuration

* Undo debug change for dist dir
2019-04-02 21:19:08 -04:00
Joe Haddad
a63a493346
Refine selective page building (#6866) 2019-04-02 20:22:04 -04:00
JJ Kasper
7c57d2f5e2
v8.0.5-canary.1 2019-04-02 18:53:51 -05:00
JJ Kasper
aac50e4501
Add error message for AMP bind syntax (#6865)
* Add error message for AMP bind syntax

* Fix custom AMP scripts getting dropped

* Add data.js to package.json to include it
in releases
2019-04-02 17:32:07 -05:00
Joe Haddad
4201fb957d
Emit manifest of all page files (#6853)
* Get all modules included in build

* Add tests

* Get all modules contained per entry chunk

* Sort files

* Add specialized page entry to manifest

* Split manifest into pages and chunks key

* Update test

* Use relative paths to build directory

* Update test
2019-04-02 15:48:05 -04:00
JJ Kasper
355ded5c86
v8.0.5-canary.0 2019-04-02 13:44:39 -05:00
JJ Kasper
6344c5f0c1
Add optimizing AMP pages (#6835)
* Added amp-toolbox-optimizer and added
optimizing AMP pages as dirty and clean

* Fix amp-optimizer breaking serverless build

* Exclude amp-toolbox-optimizer from serverless build

* Added check to make sure hybrid AMP pages
optimize cleanly during export

* Add check to make sure noDirtyAmp is applied
2019-04-02 13:01:34 -05:00
Tim Neutkens
b1fdffec75
amp-bind data injection (#6840) 2019-04-02 16:09:34 +02:00
Luis Fernando Alvarez D
84fbd4b594 added async-to-promises transform (#6797)
Replaced regenerator with async-to-promises
2019-04-02 15:42:09 +02:00
Dylan Brookes
035890f9cd Fix adblock comment (#6859) 2019-04-02 04:37:04 -04:00
Joe Haddad
e6e4a15284
v8.0.4 2019-04-01 20:45:36 -04:00
Shahzeb K
25deefbba7 Avoid "ad" anywhere in the buildId (#6854)
* Added a check for ad_ in the buildId

* ad_ > ad

Co-Authored-By: lfades <luis@zeit.co>

* Update the `ad` comment

Co-Authored-By: lfades <luis@zeit.co>

* Avoid all buildId's that contain "ad"

Looking through the uBlock Origin filter list, it uses regex wildcards to avoid various things with "ad" anywhere in the string. It's a safe bet to just avoid "ad" all together (as opposed to just at the start).

* Use regex (case incensitive) to check for "ad" 

The following cases will set this regex to true:

```
/ad/i.test("somead")
/ad/i.test("someADlksdjf")
/ad/i.test("adlksdjf")
/ad/i.test("ADlksdjf")
```
2019-04-01 20:40:43 -04:00
Luis Fernando Alvarez D
742f29fba5 buildId is not an ad (#6851)
* Added a check for ad_ in the buildId

* ad_ > ad

Co-Authored-By: lfades <luis@zeit.co>

* Update the `ad` comment

Co-Authored-By: lfades <luis@zeit.co>
2019-04-01 15:22:21 -04:00
Allen
8cd7bd1b94 Fix wrong anchors and add missing link (#6845)
self explanatory
2019-04-01 15:00:11 +02:00
JJ Kasper
3a7caa628a
v8.0.4-canary.31 2019-03-31 10:33:10 -05:00
Luis Fernando Alvarez D
c864ab9324 Added useBuiltIns to babel object-rest-spread (#6805)
Use `Object.assign` for the rest-spread transform.
2019-03-31 17:30:25 +02:00
JJ Kasper
41da136b14
v8.0.4-canary.30 2019-03-30 09:38:32 -05:00
Tim Neutkens
f6786b4140 v8.0.4-canary.29 2019-03-30 14:51:00 +01:00
Tim Neutkens
99023b97e0 v8.0.4-canary.28 2019-03-30 14:33:49 +01:00
Tim Neutkens
e48610ea68 v8.0.4-canary.27 2019-03-30 14:25:28 +01:00
Luis Fernando Alvarez D
6bb83272a3 Exclude transform-typeof-symbol (#6812)
Related to [create-react-app#5278](https://github.com/facebook/create-react-app/pull/5278#issue-220142150)
2019-03-30 01:54:05 +01:00
Luis Fernando Alvarez D
f81e5f4cad Added babel-plugin-dynamic-import-node (#6811)
Replaces `import()` with `require` only for the testing environment.
2019-03-30 01:50:24 +01:00
JJ Kasper
26a4eb827c Add dropping of custom scripts in AMP mode (#6830)
Drops user `<script>` tags and shows a warning in AMP mode. Right now they are only dropped in production mode and left in dev mode so the validator shows its warning since it looks like conflicting props log messages are being cleared causing them to not show. 

Closes: #6688
2019-03-29 17:20:12 +01:00
JJ Kasper
8b5906c888 Add error catching to firefox url query workaround (#6833)
It appears this workaround sometimes throws a `NS_ERROR_NOT_AVAILABLE` so we add error handling for it
2019-03-29 16:07:17 +01:00
Yeoh Joer
9c2f690c0a Fix typo by replacing compatability with compatibility (#6831) 2019-03-29 09:53:00 +01:00
Joe Haddad
4fd794e8ae
v8.0.4-canary.26 2019-03-27 15:22:03 -04:00
Joe Haddad
b871e43601
Add a leading slash to passed pages (#6808) 2019-03-27 15:21:30 -04:00
Alexander Nanberg
20768ff372 Upgrade unfetch to v4.1.0 (#6807)
`unfetch` ^4.0.0 is already used by `isomorphic-unfetch` so this simplifies the dependency tree a tiny bit.

Release notes
https://github.com/developit/unfetch/releases/tag/4.0.0
https://github.com/developit/unfetch/releases/tag/4.1.0
2019-03-27 19:56:46 +01:00
Jason Miller
1b4b9a34ad Add a viewport meta tag by default (#6754)
* Add default viewport meta tag (fixes #6698)

* Do not inject default viewport when rendering an AMP document

* Remove redundant viewport on error page

* Plumb withSideEffect() to pass through props, then use that for isAmp.

* Add tests for viewport meta tag.

* Fix linting

* Update dedupes test
2019-03-27 11:46:44 -05:00
Joe Haddad
2efad5a2d8
v8.0.4-canary.25 2019-03-27 12:02:26 -04:00
Joe Haddad
b835e2589d
Specified page builds (#6796)
* [wip] individual page builds

* Make flag experimental and remove from main bin

* Do not split chunks when using shared runtime
2019-03-27 11:51:05 -04:00
Luis Fernando Alvarez D
da9472246c Remove prop-types import in the build (#6798)
Tests don't catch this change because `isProduction &&` is always false so I tested it with a local build
2019-03-27 12:26:01 +01:00
JJ Kasper
244b0e700e
Add AMP validation on export (#6794)
* Add err.sh link and pool validation results
to wait to show error until export is finished

* Fix wording in amp-export-validation err.sh

* Update validation error message

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>

* Update ways to fix text

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>

* Update why the error occurred wording

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>

* Update wording some more

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
2019-03-26 16:21:27 -05:00
JJ Kasper
96c628409a
v8.0.4-canary.24 2019-03-26 11:31:48 -05:00
Joe Haddad
0249b331c2
Use a shared module cache (#6791)
* [WIP] Use a shared module cache

* ID modules in development

* Revert "ID modules in development"

This reverts commit 0613d92fa2c8c7fa11a5ff5b7770d784af1cec63.

* Remove context replacement

* Only enable shared runtime in prod

* Sort settings

* Add shared runtime experimental setting

* only enable shared runtime in serverless
2019-03-26 12:30:31 -04:00
Luis Fernando Alvarez D
dbd41725ce Removed the X-Powered-By header (#6789)
Related to #6776
2019-03-26 12:32:01 +01:00
Joe Haddad
1604862895
v8.0.4-canary.23 2019-03-25 12:18:42 -04:00
Joe Haddad
8c175e5daa Replace buildId well known string during output (#6782)
* Replace buildId well known string during output

* Fix linting
2019-03-25 17:06:00 +01:00
Tim Neutkens
7788849ad5 v8.0.4-canary.22 2019-03-25 15:09:01 +01:00
Tim Neutkens
907dd27a88
Make main.js override work correctly (#6781) 2019-03-25 15:08:02 +01:00
Tim Neutkens
24d8ec560f v8.0.4-canary.21 2019-03-25 13:01:14 +01:00
Kristian Heruc
82314137d0 Add X-Powered-By info to the docs (#6775) 2019-03-25 11:53:46 +01:00
Connor Davis
a79c004de0 Remove magic-string (#6772)
* Remove magic-string

* Add back input

* change if statement back

* Fix typo

* remomve useless import
2019-03-24 23:50:58 -04:00
Tim Neutkens
3e7b932b2b
ncc resolve and arg (#6771)
More modules to follow.
2019-03-24 23:38:03 +01:00
Tim Neutkens
fa5125488b v8.0.4-canary.20 2019-03-24 14:34:44 +01:00
Tim Neutkens
f639becf88
Don't use array for main chunk (#6767)
* Simplify getDisplayName

* Don’t use array for single file

* Add aliases, drop htmlescape as it’s not longer in the codebase

* Add correct path

* Use the correct router

* Remove dynamic for now

* Mark as external as the modules are directly called

* Add comment explaining what this does
2019-03-24 14:33:10 +01:00