Joe Haddad
041be6f4aa
Disable webpack minifier ( #6603 )
...
When the webpack `mode` is set to `production`, `minimizer: undefined` means "use the default webpack minifier."
We need to explicitly disable the webpack minifier via `minimize: false`. This should speed up non-serverless builds. 😄
This doesn't affect dev, but I added the toggle there for consistency.
2019-03-11 15:51:23 +01:00
Tim Neutkens
557fc95910
Don't use webpack multiCompiler for single configuration ( #6598 )
...
When compiling the serverless target there is no need for having an array of configs.
2019-03-10 15:46:50 +01:00
Tim Neutkens
8ffcb3f3e7
Don’t load dev plugins for production bootup ( #6589 )
...
* Don’t load autodll-webpack-plugin for production bootup
* Only require autodll when client-side compilation is ran
* Try to fix build
2019-03-09 23:27:33 -05:00
Tim Neutkens
e8095c0e2e
Remove cjs file ( #6590 )
2019-03-09 22:34:27 -05:00
Tim Neutkens
dd60199cec
Remove case-sensitive-paths-plugin ( #6587 )
...
While this is a nice feature it does filesystem operations to check if the resolved file matches the filesystem.
2019-03-10 01:44:51 +01:00
Connor Davis
f8be040c79
Next minifier cache ( #6582 )
...
Changes the name of the cache folder so we can predictably cache on Now
2019-03-09 09:09:44 +01:00
Tim Neutkens
d3e92cceec
Remove more terser-webpack-plugin code ( #6575 )
2019-03-08 16:26:20 +01:00
JJ Kasper
ff7299d184
Update react-error-overlay and use reportRuntimeError ( #6577 )
...
Fixes : #5481
2019-03-08 16:24:15 +01:00
HelloRusk
1930d7364d
fix unnatural spaces in README ( #6572 )
...
should use 2 spaces instead of 4
2019-03-08 16:06:13 +01:00
Tim Neutkens
654860e7b5
v8.0.4-canary.9
2019-03-07 19:57:48 +01:00
Tim Neutkens
3f9a44996a
Remove more terser code ( #6564 )
...
* Remove chunkfilter and extractcomments options as they’re unused
* Remove unused variable
* Remove cacheKeys option, improve filter
* Remove more terser code
* Remove unused variable
2019-03-07 19:45:49 +01:00
k-kawakami
d9060f5abd
Remove trailing spaces ( #6547 )
...
### changes
#### remove trailing spaces
When I was using example I noticed trailing spaces.
So, this PR removes the trailing spaces of json file, README, and others.
`examples/with-jest-typescript/src/modules/cars/Overview.tsx` also has it, but this time it did not change as tslint error occurs at commit.
2019-03-07 17:40:08 +01:00
Tim Neutkens
9b62f208bb
Remove cacheKeys option and improve filtering ( #6559 )
...
More cleanup of terser-plugin.
2019-03-07 14:28:32 +01:00
Roman Ernst
cf0552a395
Fix wrong env key in build time configuration docs ( #6561 )
...
Env-Key definition should be constantly either `customEnv` or `customKey` - I went for `customKey`.
2019-03-07 12:51:08 +01:00
Santhosh Sundar
1e8017989d
fixed typo in code comment ( #6555 )
...
This PR fixes a typo in one of the comments in the "Customizing renderPage" code example.
2019-03-07 11:45:08 +01:00
Tim Neutkens
abad29b413
Remove chunkfilter and extractcomments options as they’re unused ( #6549 )
...
Remove some obsolete code paths.
2019-03-06 21:28:42 +01:00
Ryan Hinchey
5dbbf79abc
changing an url to a url in the readme ( #6540 )
...
Thanks so much for putting this amazing framework together!
I was reading through the docs and noticed how `an URL` was a little awkward to read. This is an incredibly small update to the readme to change the wording to `a URL`.
2019-03-06 13:16:34 +01:00
Tim Neutkens
f177ce4291
v8.0.4-canary.8
2019-03-06 13:10:21 +01:00
Tim Neutkens
0088083f52
Check if esmodules is supported before enabling useESModules ( #6534 )
...
* Check if esmodules is supported before enabling useESModules
* Remove console.log
2019-03-05 16:57:07 +01:00
Tim Neutkens
e10096cd0c
Add preload notice ( #6532 )
...
Fixes #6517
2019-03-05 14:55:05 +01:00
Connor Davis
861edad459
Implement Recursive Delete ( #6489 )
...
Removes `rimraf` for a smaller custom lib
Benchmarks (in ms):
```
rimraf 1
518.536376
rimraf 2
416.112451
rimraf 3
451.905842
rimraf 4
525.117395
rimraf 5
434.230384
---- Average: 469.18ms
-----------
recursive delete 1
121.493979
recursive delete 2
130.335272
recursive delete 3
149.798316
recursive delete 4
182.184688
recursive delete 5
130.346207
--- Average: 142.83ms
```
`recursiveDelete` finishes in ~30% of the time it takes `rimraf` (3.3 times faster)
2019-03-05 14:01:42 +01:00
JJ Kasper
491f9a2c49
Move next-mdx from zeit/next-plugins to zeit/next.js ( #6443 )
...
At request of @timneutkens I moved the `next-mdx` plugin from the next-plugins repo into Next.js. Also fixed small typo in README under setup.
2019-03-04 18:02:45 +01:00
Tim Neutkens
8f25bc6871
v8.0.4-canary.7
2019-03-03 20:47:05 +01:00
JJ Kasper
c3b1f31ed5
Fix /index/index.js route not emitting the right route in production ( #6516 )
...
Also added integration test in production for this
Fixes : #6285
2019-03-03 19:36:32 +01:00
JJ Kasper
4c35b7e704
Add warning on stalled page load possibly from too many tabs open ( #6514 )
...
* Add warning on stalled page load possibly from too many tabs open
* Add test for stalled warning
* Update onDemand pinging to close on routeChangeStart and added
warning when onDemand handler detects multiple tabs from the same
browser
2019-03-02 16:51:14 -06:00
JJ Kasper
5034e4e1de
Updated entries to not output _app and _document in serverless ( #6512 )
...
* Updated entries to not output _app and _document in serverless
* Add test
2019-03-02 13:53:13 -06:00
Joe Haddad
494889acd8
Format a few documents ( #6505 )
2019-03-01 14:51:13 -05:00
JJ Kasper
a9c398854a
Add console.error before exit on uncaughtException ( #6504 )
2019-03-01 13:18:33 -06:00
Tim Neutkens
a169017c87
Add docs for named exports using dynamic ( #6502 )
2019-03-01 17:28:29 +01:00
Anton Egorov
5db0bef98e
update webpack-dev-middleware to fix querystring in file names ( #6498 )
...
Fixes #6481
2019-03-01 17:28:09 +01:00
Tim Neutkens
8eb813a640
await config ( #6488 )
...
* await config
* update config-promise-error test
* Actually update test
2019-03-01 01:09:07 +01:00
Joe Haddad
330bedacc7
Add Babel plugin that fixes className for Amp elements ( #6486 )
...
This is a simple Babel plugin that overwrites certain attributes for `amp-` elements.
2019-02-28 23:04:29 +01:00
Joe Haddad
a8d7a6ce42
v8.0.4-canary.6
2019-02-28 15:38:12 -05:00
Joe Haddad
68123d8b8d
v8.0.4-canary.5
2019-02-28 14:35:21 -05:00
Joe Haddad
cc2b7bc8fa
Setup on-demand-entries ping to prevent AMP page disposal ( #6484 )
...
* refactor(on-demand-entries): extract method: setupPing
* Setup ping for amp pages
* Missed a call
2019-02-28 12:52:13 -05:00
Joe Haddad
c904126057
refactor(on-demand-entries): extract method: setupPing ( #6483 )
...
* refactor(on-demand-entries): extract method: setupPing
* Missed a call
2019-02-28 12:31:31 -05:00
JJ Kasper
8ae1cd35bd
Fix dynamic require breaking after updating to v8 ( #6475 )
...
* Fix dynamic require breaking after updating to v8
* Add test for dynamic require
2019-02-28 14:41:54 +01:00
JJ Kasper
1c1d5d01f8
Throw error when Promise is returned in next.config ( #6476 )
...
After discussion, it was decided we should throw an error when a promise is returned in `next.config.js` as this isn't supported
Fixes : #6416
2019-02-28 14:39:51 +01:00
Joe Haddad
227ea5756d
Change ncc taskr function name ( #6471 )
2019-02-27 09:22:18 -05:00
Joe Haddad
41eaa9cf5a
Run ncc on unistore to fix install warning ( #6459 )
...
ncc unistore to fix install warning
2019-02-27 09:12:40 -05:00
Tim Neutkens
88388f79b4
v8.0.4-canary.4
2019-02-27 13:20:30 +01:00
JJ Kasper
256970ac75
Remove next-to-next-server babel plugin ( #6458 )
...
After discussion it was decided instead of rewriting `next/config` and `next/head` imports to `next-server/config` and `next-server/head` we should just allow importing them as `next/config` and `next/head`
Fixes : #6187
2019-02-27 11:00:02 +01:00
Connor Davis
b8d3b7e69e
v8.0.4-canary.3
2019-02-26 16:07:42 -06:00
Connor Davis
2fd397ff5a
Add error for exporting when target is not server ( #6455 )
2019-02-26 15:48:30 -06:00
Connor Davis
7dc50f3867
Remove cross-spawn ( #6450 )
2019-02-26 14:57:32 -06:00
Jan Potoms
5f70c23465
Fix for index.js pages inside a folder named 'index' ( #6423 )
...
* Add failing test
Test case for
https://github.com/zeit/next.js/issues/6285
and
https://github.com/zeit/next.js/issues/6380
* WIP
* refactor and fix test
* not problem
* refactor back
* rename variables
like https://github.com/zeit/next.js/blob/canary/packages/next/server/on-demand-entry-handler.js#L163
* Update usage and add comment
2019-02-26 15:57:45 +01:00
Joe Haddad
6ffc2ffc2a
v8.0.4-canary.2
2019-02-25 17:55:33 -05:00
Joe Haddad
f15cfeba0a
AMP automatic page refreshing in dev ( #6392 )
...
* AMP page reload
* Fix comment
* Skip dev files in production
* Polyfill event source
* Add HMR test for AMP
* Use webdriver
* Use a dynamic server for HMR test
* ffs
2019-02-25 17:00:14 -05:00
Jesse Hoffman
a971d295ab
Remove jsonPageRes Documentation Reference ( #6440 )
...
Next.js no longer uses `jsonPageRes`.
This PR removes it from `en-us` and `zh-cn` documentation (formatting picked up some changes on zh-cn readme).
Also updated the Flow type def for `getInitialProps`.
Resolves #6363
2019-02-25 16:49:11 +01:00
Connor Davis
5514949df0
Remove glob package ( #6415 )
...
We don't use a lot of the features of `glob`, so let's remove it in favor of a leaner approach using regex.
It's failing on windows and I have no idea why and don't own a windows machine 🤦🏼♂️
(Ignore some of the commits in here, I forgot to create the new branch before I started working)
2019-02-24 22:08:35 +01:00
Tim Neutkens
f7ee137f9c
v8.0.4-canary.1
2019-02-23 12:25:34 +01:00
Tim Neutkens
297f1a3fc0
Remove event-source-polyfill dependency
2019-02-23 11:51:54 +01:00
Tim Neutkens
41ed6803ac
v8.0.4-canary.0
2019-02-23 11:21:29 +01:00
Connor Davis
b146eb5200
Replace del
with rimraf
package ( #6411 )
2019-02-22 13:49:30 -06:00
Tim Neutkens
bfb5224ce4
Remove schema-utils dependency ( #6413 )
2019-02-22 20:05:34 +01:00
Tim Neutkens
6d17a93b63
Upgrade async-sema ( #6410 )
2019-02-22 19:14:38 +01:00
Connor Davis
597c7d447a
Add taskfile for ncc ( #6409 )
...
* Add ncc taskfile
* Add ncc dep and pass options
* dev dep
2019-02-22 17:33:53 +01:00
Tim Neutkens
e60a7cf529
Remove mkdirp-then in favor of promisify ( #6408 )
2019-02-22 17:33:28 +01:00
Tim Neutkens
9247c90177
Remove http-status dependency ( #6405 )
2019-02-22 16:25:11 +01:00
Tim Neutkens
b88addfcd5
Remove event-source-polyfill dependency ( #6407 )
2019-02-22 16:23:58 +01:00
Tim Neutkens
a99323cbc0
v8.0.3
2019-02-22 13:35:24 +01:00
Tim Neutkens
ca7b77292b
v8.0.3-canary.0
2019-02-22 10:39:39 +01:00
Tim Neutkens
d0e90d05a0
Don’t hide parse error from on-demand-entries
2019-02-22 10:38:40 +01:00
Tim Neutkens
299eeb4f4f
Merge branch 'master' into canary
2019-02-22 10:37:20 +01:00
JJ Kasper
71ae456a7c
Fix invalid ping response throwing error in client ( #6397 )
2019-02-22 10:22:23 +01:00
Tim Neutkens
016d41f2a8
v8.0.2
2019-02-22 00:17:13 +01:00
Tim Neutkens
d14d1704cb
Remove ansi-html dep ( #6394 )
...
It's not needed since we use react-error-overlay for webpack errors.
2019-02-22 00:12:47 +01:00
Tim Neutkens
ce7dcaeadb
v8.0.2-canary.7
2019-02-21 15:43:00 +01:00
Joe Haddad
1757ad022c
Drop cli-cursor dependency ( #6387 )
2019-02-21 15:34:35 +01:00
Tim Neutkens
faf69b45c2
v8.0.2-canary.6
2019-02-21 01:09:43 +01:00
Joe Haddad
3ba18117f3
Pass all <Html>
props to <html>
( #6378 )
...
* Pass along props to html
* Check for html props to be passed
* Switch ordering of html tag props
* Remove children from this.props
2019-02-21 00:42:53 +01:00
Joe Haddad
8b784766f1
Remove alternate screen usage ( #6377 )
...
* Make console output well behaved
* Fix bad rebase
2019-02-21 00:42:27 +01:00
Isaac Hinman
6e23b75c90
feat: Validate url.format calls ( #6379 )
2019-02-20 17:01:45 -05:00
Connor Davis
61de215e04
Move webpack config to TypeScript ( #6348 )
2019-02-20 13:24:02 -06:00
Tim Neutkens
0bf5041ef4
v8.0.2-canary.5
2019-02-20 17:05:55 +01:00
Joe Haddad
5ff2deabf7
Add Html tag for custom Document ( #6372 )
...
This introduces a new `<Html>` tag for a custom `Document` so that we can correctly toggle the `amp` flag (among other things in the future ... maybe).
This is already "tested" through every other test & the AMP validator -- but let me know if we want explicit tests.
2019-02-20 15:46:29 +01:00
Tim Neutkens
b0a9b99b7f
v8.0.2-canary.4
2019-02-20 13:30:27 +01:00
Joe Haddad
90f9c64b74
Use alternate screen buffer if terminal supports it ( #6364 )
2019-02-20 07:20:09 -05:00
wtgtybhertgeghgtwtg
ddd01df4ec
Make getBaseWebpackConfig
synchronous. ( #6356 )
...
Currently, `getBaseWebpackConfig` is marked async, but it doesn't await anything or otherwise return a Promise. Please correct me if I am wrong, but it looks like it can be made synchronous.
2019-02-20 00:05:46 +01:00
Connor Davis
fcf1167cd4
Upgrade standard and fix files ( #6358 )
...
Upgrades `standard` to major version 12
2019-02-19 22:45:07 +01:00
JJ Kasper
bf69357f27
Remove onDemandEntries WebSocket server in favor of EventSource connection ( #6354 )
...
After talking with @timneutkens it was decided it'd be more streamlined to replace the onDemandEntries WebSocket with an alternative. Using the EventSource connection gives us these benefits over the WebSocket one:
- less code needed
- no extra server running
- no extra config for onDemandEntries
2019-02-19 21:58:47 +01:00
Timothy
3db5361047
Update readme with ZEIT Now deployment guide link ( #6341 )
...
* Update readme with ZEIT Now deployment guide link
* Update links to ZEIT Now deployment guide
* Fix missing word
2019-02-19 17:37:00 +01:00
Joe Haddad
a2f37ba4cc
Join merged style tags ( #6345 )
2019-02-19 14:45:26 +01:00
Kenneth Luján Rosas
fb672478c1
fix: pass full path to launch-editor
( #6302 )
...
* fix(launch-editor): resolve filename including current working directory
* refactor: handle when fileName is already absolute
* feat: use Next.js dir instead of process.cwd()
2019-02-18 10:16:28 -05:00
Joe Haddad
6dfcacb7bf
Use a query parameter for AMP pages instead of new route ( #6336 )
...
Per consensus in a mixed-application scenario, we'll use the `amp` query parameter convention.
2019-02-18 09:44:21 -05:00
Tim Neutkens
9f2eb85de3
v8.0.2-canary.3
2019-02-17 20:48:43 +01:00
Tim Neutkens
a1ccc19a1f
Pass through arguments of the next cli correctly ( #6327 )
...
Arguments that held the same name as one of the default commands were filtered out, causing issues.
For example `next build build` would get rid of the second `build` parameter.
Fixes #6263
2019-02-17 20:13:10 +01:00
Tim Neutkens
774af7fa0b
v8.0.2-canary.2
2019-02-17 13:15:42 +01:00
Joshua Scott
46d870ab8a
Fix url in docs ( #6323 )
2019-02-17 12:57:17 +01:00
Joe Haddad
7078f6567d
Make build output friendlier ( #6320 )
...
Success:
![image](https://user-images.githubusercontent.com/616428/52907314-5e636480-322d-11e9-9420-b348663a3a7a.png )
Error:
![image](https://user-images.githubusercontent.com/616428/52907318-6c18ea00-322d-11e9-848d-e615d6af747d.png )
Warnings:
![image](https://user-images.githubusercontent.com/616428/52907353-2d376400-322e-11e9-9778-370f36912491.png )
---
We can still make build error output friendlier, but this is a good start.
2019-02-17 12:56:48 +01:00
Tim Neutkens
3882979236
v8.0.2-canary.1
2019-02-16 17:12:27 +01:00
Joe Haddad
56b1f81ace
Fix development mode output ( #6312 )
...
* Remove usage of WebpackBar and Friendly Errors
* Add new clearConsole helper
* Add new simplified output for development mode
* Add an explicit bootstrapping mode
* Add missing returns
* Use existing output style
* Adjust first output to say Waiting on
* Only print URL if present
2019-02-16 17:09:49 +01:00
Tim Neutkens
036f5bf11b
v8.0.2-canary.0
2019-02-16 16:41:30 +01:00
Tim Neutkens
708c537fc6
Merge branch 'master' into canary
2019-02-16 16:38:42 +01:00
JJ Kasper
5d779a0289
Add falling back to fetch based pinging for onDemandEntries ( #6310 )
...
After discussion, I added falling back to fetch based pinging when the WebSocket fails to connect. I also added an example of how to proxy the onDemandEntries WebSocket when using a custom server. Fixes : #6296
2019-02-15 22:22:21 +01:00
Connor Davis
1e5d0908d0
Block Certain Env Keys That Are Used Internally ( #6260 )
...
Closes : #6244
This will block the following keys:
```
NODE_.+
__.+
```
There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
2019-02-15 17:49:40 +01:00
Joe Haddad
9bb8fbf535
Update webpack message formatter ( #6299 )
2019-02-14 11:13:35 -05:00
Tim Neutkens
4051ffcb01
[experimental] Rendering to AMP ( #6218 )
...
* Add initial AMP implementation
* Implement experimental feature flag
* Implement feedback from sbenz
* Add next/amp and `useAmp` hook
* Use /:path*/amp instead
* Add canonical
* Add amphtml tag
* Add ampEnabled for rel=“amphtml”
* Remove extra type
2019-02-14 10:22:57 -05:00
Gary Meehan
126eb49867
Fix README links ( #6284 )
2019-02-13 10:53:04 -05:00
Tim Neutkens
7fd9cb440d
v8.0.1
2019-02-13 09:31:49 +01:00