Xinzi Zhou
9609fe453d
Replace fs.exists with fs.access ( #7742 )
...
* Replace deprecated fs.exists with fs.access.
* Update packages/next/lib/file-exists.ts
Co-Authored-By: Joe Haddad <timer150@gmail.com>
* Update packages/next/lib/file-exists.ts
Co-Authored-By: Joe Haddad <timer150@gmail.com>
2019-07-16 23:01:21 -07:00
JJ Kasper
fad4ec3958
Don't externalize ssr-prepass if added by user ( #7966 )
2019-07-15 16:41:53 +02:00
Joe Haddad
13cf664898
Add support for legacy server npm modules ( #7898 )
...
Notably, this PR fixes `faunadb` which relies on `formidable`.
n.b. `formidable` is an unmaintained legacy npm package that uses practices not compatible with the modern ecosystem.
2019-07-11 13:02:43 -04:00
Joe Haddad
b2a9670ca4
Make exportTrailingSlash
stable ( #7746 )
2019-07-03 13:25:44 -04:00
Joe Haddad
5493f2e8b3
Remove Next.js debug mode ( #7719 )
2019-07-01 13:13:06 -04:00
JJ Kasper
564eac4746
Fix styled-jsx not rendering when used in node_modules ( #7697 )
...
* Don't transpile styled-jsx in server mode
* Add test fo styled-jsx-module
* Add styled-jsx as dependency of next-server
2019-06-29 15:42:07 -07:00
Joe Haddad
3aed76fad8
Unflag Automatic Prerendering ( #7666 )
...
* Unflag Dynamic Routing
* Unflag Automatic Prerendering
* Ensure pages are lambdas for test
* Fix file check
* Fix tests
* oof
* Use lambda for document middleware test
2019-06-28 16:01:11 -04:00
Joe Haddad
e7110a0347
Asynchronously check for type errors ( #7668 )
...
* Asynchronously check for type errors
* Add TODO
* Fix webpack invalidation
* Show TypeScript error in dev client
2019-06-26 14:54:23 -04:00
JJ Kasper
8c9819200b
Fix missing .test(path) in webpack-config ( #7655 )
2019-06-24 18:05:15 -07:00
Joe Haddad
0af9d849d3
Compile dependencies for IE11 ( #7646 )
...
This PR compiles development-time dependencies that cause invalid syntax errors in IE 11 (ES 5).
Closes #7610
Closes #7612
2019-06-24 11:45:36 -04:00
Joe Haddad
31b3106a32
Revert "ncc Webpack build redux ( #7628 )"
...
This reverts commit e85a517e1a
.
2019-06-24 09:48:26 -04:00
Guy Bedford
e85a517e1a
ncc Webpack build redux ( #7628 )
...
* Reimplement ncc webpack build
This reverts commit 6feca310d7
.
* 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
2019-06-21 12:28:41 -04:00
Joe Haddad
69150043e4
typeof window
is object
on the client (#7606 )
2019-06-18 22:22:32 -04:00
Joe Haddad
50b5334a70
typeof window
will always be undefined on the server (#7605 )
...
This should allow Terser to tree shake code branches.
2019-06-18 20:59:30 -04:00
Joe Haddad
92ae28b843
Tune default Terser configuration ( #7554 )
...
This adjusts our default terser configuration to not break seemingly valid JavaScript code.
Closes #7178
Closes #7496
2019-06-11 13:34:45 -04:00
JJ Kasper
8a8cde1b39
Refresh query on mount for exported pages ( #7462 )
...
* Refresh query on mount for exported pages
* Make sure to only refresh query if it is different
* Only update if search isn't empty
* Merge pre-rendered query values with
current query values
* Remove dynamic restriction for autoExporting
* Update dynamic routing test fo autoExport
* Remove autoExport from client-navigation test
* Remove logs and update trailing slash config
* Update nextExport tests in client-navigation
* Disable autoExport in export suite
2019-05-30 17:34:05 -07:00
JJ Kasper
683a634a1e
Make react-ssr-prepeass external if not enabled ( #7466 )
2019-05-29 19:40:23 -07:00
Joe Haddad
b6dd463d93
Enable strict export presence in webpack ( #7446 )
2019-05-28 12:43:07 -07:00
JJ Kasper
cdd54afb0d
Add auto static/dynamic ( #7293 )
...
* Add automatic exporting of pages with no getInitialProps
* Add support for exporting serverless to static
and serving the html files during next start
* Fix missing runtimeEnv when requiring page, re-add warning
when trying to export with serverless, and update tests
* Update flying-shuttle test
* revert un-used pagesManifest change
* remove query.amp RegExp test
* Fix windows backslashes not being replaced
* Re-enable serverless support for next start
* bump
* Fix getInitialProps check
* Fix incorrect error check
* Re-add check for reserved pages
* Fix static check
* Update to ignore /api pages and clean up some tests
* Re-add needed next.config for test and correct behavior
* Update RegExp for ignored pages for auto-static
* Add checking for custom getInitialProps in pages/_app
* Update isPageStatic logic to only use default export
* Re-add retrying to CircleCi
* Update query during dev to only have values
available during export for static pages
* Fix test
* Add warning when page without default export is
found and make sure to update pages-manifest
correctly in flying-shuttle mode
* Fix backslashes not being replaced
* Integrate auto-static with flying-shuttle
and make sure AMP is handled in flying-shuttle
* Add autoExport for opting in
2019-05-22 09:36:53 -07:00
JJ Kasper
842a2905fe
Disable babel-loader cache in flying shuttle mode ( #7365 )
...
* Disable babel-loader cache in flying shuttle mode
* Move cleaning up old babel-loader caches
* Change option name for disabling cache on babel-loader
2019-05-17 15:39:18 -04:00
Tim Neutkens
6feca310d7
Revert ncc webpack ( #7370 )
...
* Revert "Add retrying to CircleCi and fixes for ncc'ed webpack (#7366 )"
This reverts commit 5beb365d12
.
* Revert "ncc Webpack build (#7301 )"
This reverts commit bd8f3c625f
.
# Conflicts:
# packages/next/package.json
2019-05-17 13:25:46 +02:00
Guy Bedford
bd8f3c625f
ncc Webpack build ( #7301 )
...
* add back ncc
* fixup ncc build
2019-05-16 11:55:54 -05:00
JJ Kasper
0eab07b7e8
Add automatic TypeScript setup ( #7125 )
...
* replace fkill with tree-kill
2019-05-08 21:51:23 -05:00
Joe Haddad
9f4904ff10
Integrate type checking into compilation pipeline ( #7278 )
2019-05-07 20:11:56 -05:00
JJ Kasper
c421c259ec
Fix webpack fetch error ( #7253 )
...
* Add devtool to AutoDllPlugin to prevent
react-error-overlay from attempting to
fetch webpack://
* Fix map file being added as script
2019-05-05 13:03:13 +02:00
JJ Kasper
2e8088e447
Add stats to build tree ( #7194 )
...
* Copy pretty-bytes instead of installing
2019-05-01 15:31:08 -05:00
Keanu Lee
d0ca9c9eb5
Clean up code/testing artifacts from #7014 ( #7211 )
2019-05-01 13:56:35 -05:00
Keanu Lee
d120f14d1c
Use modern syntax in Next client code (e.g. async await) ( #7014 )
...
* Use async/await in build output
* Run next client libraries through plugin-transform-modules-commonjs
* Fix missing includes
2019-05-01 19:16:52 +02:00
JJ Kasper
ceb60b650a
revert nccing webpack ( #7189 )
2019-04-28 15:35:40 -05:00
Connor Davis
f66546f950
Use ncc to bundle webpack ( #6347 )
2019-04-26 17:24:30 -05:00
Joe Haddad
13f6804503
Don't resolve ts|tsx for non-TypeScript users ( #7173 )
...
* Don't resolve ts|tsx for non-TypeScript users
* Add missing prettier file
* Add tsconfig.json file
2019-04-27 01:12:40 +09:00
Joe Haddad
5cc8079946
Run Prettier on webpack configuration ( #7172 )
2019-04-27 00:23:32 +09:00
Joe Haddad
3daa473e6d
Disable Terser Cache When Using Flying Shuttle ( #7168 )
2019-04-26 21:47:57 +09:00
JJ Kasper
5aba5e62fe
Add warning for @zeit/next-typescript ( #7163 )
2019-04-25 15:49:39 -05:00
Tim Neutkens
047bcca4bf
Add support for .ts / .tsx import without extension ( #7152 )
2019-04-25 11:14:12 +02:00
Joe Haddad
0c3018c6ce
A webpack bug is preventing us from hashing chunks ( #7142 )
2019-04-25 01:50:29 +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
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
Tim Neutkens
c79558328e
Add Typescript compilation ( #7110 )
2019-04-23 11:54:08 +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
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
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
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
Connor Davis
f8978cc29c
Detect built ins in externals ( #7083 )
2019-04-20 10:44:39 +09:00
Joe Haddad
35236690c0
Disable Terser loader when debugging ( #7079 )
2019-04-19 13:26:30 +09:00
JJ Kasper
6f9c3aa839
Remove experimental amp config ( #7046 )
...
This just removes the need for setting the experimental amp option
2019-04-16 22:09:57 +09:00
Joe Haddad
8b136a6f9d
Add experimental option to enable terser loader ( #7033 )
2019-04-15 20:00:01 +09:00
JJ Kasper
cf889d6094
Re-add experimental amp config ( #7030 )
...
* Update amphtml and canonical rels, put amp behind
experimental flag again, and update checking for amp query
* Fix typescript error
* Re-add flag to next.config.js
2019-04-15 18:26:23 +09:00
Joe Haddad
74cb4f4b7b
Switch to using .next/cache
for flying shuttle and terser ( #7013 )
2019-04-11 17:09:12 -04:00
Joe Haddad
cc09478a7b
Disable terser on .min.js input files ( #7008 )
...
This skips re-compressing already minified files.
2019-04-11 17:33:30 +02:00