- 27 Jun, 2018 2 commits
-
-
Tim Neutkens authored
-
Steve Korshakov authored
I have spend whole day on profiling next.js compiling performance and one of the easy hacks to reduce built time is avoid doing full `stats.toJson()` that is heavy by default.
-
- 25 Jun, 2018 3 commits
-
-
Tim Neutkens authored
-
Tim Neutkens authored
Fixes #4664
-
Kelly Burke authored
-
- 24 Jun, 2018 1 commit
-
-
Olivier Tassinari authored
I can't use a functional component with `_document.js`. [is-react](https://www.npmjs.com/package/is-react) can be used for another potential implementation of the warning logic, but maybe relying on `React.createElement()` internal checks is enough.
-
- 23 Jun, 2018 2 commits
-
-
Bünyamin Benny Genel authored
with-socket.io example was using a single index file and was managing connection in there. This would lead handling connection (disconnecting and reconnecting) in each added page. I updated example with addition of `_app.js` and handled connection in there. This helped only subscribing to event in page and maintaining connection throughout example.
-
Olivier Tassinari authored
Unless I'm missing something, we don't need this async. The transpiled JavaScript is much smaller
🚀
-
- 22 Jun, 2018 4 commits
-
-
Olivia Isaacs authored
Fixes #4284 Made change as discussed in #4284
-
Brice BERNARD authored
-
Tim Neutkens authored
* Rephrase url deprecation text and add link to next-codemod * Clean up double words
-
Tim Neutkens authored
Next.js supports React 15 / React-like alternatives that don’t have the `rehydrate` method (preact) again since Next.js 5+. It’s still not recommended to use React 15. But there’s no need to mention that here as this is the initial installation and we instruct the user to install the latest version of React.
-
- 19 Jun, 2018 2 commits
-
-
Bünyamin Benny Genel authored
Small example app using [unstated](https://github.com/jamiebuilds/unstated) library. Example uses components and logic from [with-redux](https://github.com/zeit/next.js/tree/canary/examples/with-redux) example.
-
Tim Neutkens authored
-
- 18 Jun, 2018 2 commits
-
-
Alexander authored
Failing test for #4620
-
Tim Neutkens authored
Fixes #4620 On the server and when navigating pages, the `asPath` is the pathname + query + hash visible to the users, not an url. This makes sure that we keep it consistent between hot reloads.
-
- 17 Jun, 2018 1 commit
-
-
Telegin Evgeniy authored
resolves #4623
-
- 16 Jun, 2018 4 commits
-
-
Tim Neutkens authored
Also adds basic `flow` to webpack.js and the plugins.
-
Tim Neutkens authored
-
Tim Neutkens authored
This makes sure plugins like @zeit/next-typescript or @zeit/next-mdx don't have to provide the `hot-self-accept-loader`. This fixes for example @zeit/next-mdx, which doesn't implement `pageExtensions` but we do use mdx as top level pages for https://github.com/zeit/docs
-
Tim Neutkens authored
-
- 15 Jun, 2018 3 commits
-
-
Telegin Evgeniy authored
I have updated [examples/with-markdown](https://github.com/zeit/next.js/tree/canary/examples/with-markdown) in order to make it works with next 6
🎉 <details> <summary>Error</summary> Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/zhenyatelegin/Desktop/next.js/examples/with-markdown/node_modules/markdown-in-js/babel.js </details> -
Tim Neutkens authored
-
Telegin Evgeniy authored
Hello! I have updated `babel-plugin-module-resolver` to `^3.1.1` and moved it to `devDependencies` in [with-absolute-imports](https://github.com/zeit/next.js/tree/canary/examples/with-absolute-imports) example to make it work with Babel 7 :) ## Error logs ``` zhenyatelegin@MBP-Zhenya ~/Desktop/next.js/examples/with-absolute-imports canary yarn build yarn run v1.5.1 warning package.json: No license field $ next build > Failed to build { Error: (client) ./pages/index.js Module build failed: Error: Cannot find module 'babel-plugin-module-resolver' from '/Users/zhenyatelegin/Desktop/next.js/examples/with-absolute-imports' at Function.module.exports [as sync] (/Users/zhenyatelegin/Desktop/next.js/node_modules/resolve/lib/sync.js:40:15) at resolveStandardizedName (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/files/plugins.js:78:29) at resolvePlugin (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/files/plugins.js:27:10) at loadPlugin (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/files/plugins.js:35:18) at createDescriptor (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:152:21) at /Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:104:12 at Array.map (<anonymous>) at createDescriptors (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:103:27) at createPluginDescriptors (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:99:10) at /Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:50:19 at plugins (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:40:25) at mergeChainOpts (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-chain.js:296:68) at /Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-chain.js:251:7 at buildRootChain (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-chain.js:85:20) at loadPrivatePartialConfig (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/partial.js:41:53) at Object.loadPartialConfig (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/partial.js:66:16) @ multi ./pages/index.js at /Users/zhenyatelegin/Desktop/next.js/dist/server/build/index.js:144:31 at runWithDependencies (/Users/zhenyatelegin/Desktop/next.js/node_modules/webpack/lib/MultiCompiler.js:154:4) at /Users/zhenyatelegin/Desktop/next.js/node_modules/async/dist/async.js:1140:9 at /Users/zhenyatelegin/Desktop/next.js/node_modules/async/dist/async.js:473:16 at iteratorCallback (/Users/zhenyatelegin/Desktop/next.js/node_modules/async/dist/async.js:1064:13) at /Users/zhenyatelegin/Desktop/next.js/node_modules/async/dist/async.js:969:16 at /Users/zhenyatelegin/Desktop/next.js/node_modules/async/dist/async.js:1137:13 at runCompilers (/Users/zhenyatelegin/Desktop/next.js/node_modules/webpack/lib/MultiCompiler.js:96:47) at fn (/Users/zhenyatelegin/Desktop/next.js/node_modules/webpack/lib/MultiCompiler.js:101:6) at compiler.run (/Users/zhenyatelegin/Desktop/next.js/node_modules/webpack/lib/MultiCompiler.js:150:5) at emitRecords.err (/Users/zhenyatelegin/Desktop/next.js/node_modules/webpack/lib/Compiler.js:265:13) at Compiler.emitRecords (/Users/zhenyatelegin/Desktop/next.js/node_modules/webpack/lib/Compiler.js:371:38) at emitAssets.err (/Users/zhenyatelegin/Desktop/next.js/node_modules/webpack/lib/Compiler.js:258:10) at applyPluginsAsyncSeries1.err (/Users/zhenyatelegin/Desktop/next.js/node_modules/webpack/lib/Compiler.js:364:12) at next (/Users/zhenyatelegin/Desktop/next.js/node_modules/tapable/lib/Tapable.js:218:11) at Compiler.compiler.plugin (/Users/zhenyatelegin/Desktop/next.js/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4) errors: [ '(client) ./pages/index.js\nModule build failed: Error: Cannot find module \'babel-plugin-module-resolver\' from \'/Users/zhenyatelegin/Desktop/next.js/examples/with-absolute-imports\'\n at Function.module.exports [as sync] (/Users/zhenyatelegin/Desktop/next.js/node_modules/resolve/lib/sync.js:40:15)\n at resolveStandardizedName (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/files/plugins.js:78:29)\n at resolvePlugin (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/files/plugins.js:27:10)\n at loadPlugin (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/files/plugins.js:35:18)\n at createDescriptor (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:152:21)\n at /Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:104:12\n at Array.map (<anonymous>)\n at createDescriptors (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:103:27)\n at createPluginDescriptors (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:99:10)\n at /Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:50:19\n at plugins (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:40:25)\n at mergeChainOpts (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-chain.js:296:68)\n at /Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-chain.js:251:7\n at buildRootChain (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-chain.js:85:20)\n at loadPrivatePartialConfig (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/partial.js:41:53)\n at Object.loadPartialConfig (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/partial.js:66:16)\n @ multi ./pages/index.js', '(server) ./pages/index.js\nModule build failed: Error: Cannot find module \'babel-plugin-module-resolver\' from \'/Users/zhenyatelegin/Desktop/next.js/examples/with-absolute-imports\'\n at Function.module.exports [as sync] (/Users/zhenyatelegin/Desktop/next.js/node_modules/resolve/lib/sync.js:40:15)\n at resolveStandardizedName (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/files/plugins.js:78:29)\n at resolvePlugin (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/files/plugins.js:27:10)\n at loadPlugin (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/files/plugins.js:35:18)\n at createDescriptor (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:152:21)\n at /Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:104:12\n at Array.map (<anonymous>)\n at createDescriptors (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:103:27)\n at createPluginDescriptors (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:99:10)\n at /Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:50:19\n at plugins (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-descriptors.js:40:25)\n at mergeChainOpts (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-chain.js:296:68)\n at /Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-chain.js:251:7\n at buildRootChain (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/config-chain.js:85:20)\n at loadPrivatePartialConfig (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/partial.js:41:53)\n at Object.loadPartialConfig (/Users/zhenyatelegin/Desktop/next.js/node_modules/@babel/core/lib/config/partial.js:66:16)\n @ multi ./pages/index.js' ], warnings: [] } error An unexpected error occurred: "Command failed. Exit code: 1 Command: sh Arguments: -c next build Directory: /Users/zhenyatelegin/Desktop/next.js/examples/with-absolute-imports Output: ". info If you think this is a bug, please open a bug report with the information provided in "/Users/zhenyatelegin/Desktop/next.js/examples/with-absolute-imports/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ```
-
- 14 Jun, 2018 6 commits
-
-
Rafał Ruciński authored
A follow-up to #4604: the dot in the regexp was not escaped as intended. By default `*` matches greedily, so the results are the same, but the new regexp should be more clear. Sorry for the mistake.
-
Tim Neutkens authored
The prepares for next-server. I also took this as an opportunity to get all build directory paths from a single location, as they were previously scattered across webpack/babel plugins and loaders.
-
Tim Neutkens authored
-
Constantine authored
-
Andrew McLagan authored
Fixes #4572 This PR intends to address https://github.com/zeit/next.js/issues/4572 around documenting browser support and what needs polyfills. There are many outstanding issues on the tracker regarding browser support and polyfills. This may alleviate some of them.
-
Rafał Ruciński authored
Fixes #4603. Tests explain it the best: ```js describe('development mode (no chunkhash)', () => { it('should strip the extension from the filename', () => { const filename = 'foo_bar_0123456789abcdef.js' expect(getChunkNameFromFilename(filename, true)).toBe('foo_bar_0123456789abcdef') }) it('should only strip the extension even if there\'s a hyphen in the name', () => { const filename = 'foo-bar-0123456789abcdef.js' expect(getChunkNameFromFilename(filename, true)).toBe('foo-bar-0123456789abcdef') }) }) describe('production mode (with chunkhash)', () => { it('should strip the hash from the filename', () => { const filename = 'foo_bar_0123456789abcdef-0123456789abcdef.js' expect(getChunkNameFromFilename(filename, false)).toBe('foo_bar_0123456789abcdef') }) it('should only strip the part after the last hyphen in the filename', () => { const filename = 'foo-bar-0123456789abcdef-0123456789abcdef.js' expect(getChunkNameFromFilename(filename, false)).toBe('foo-bar-0123456789abcdef') }) }) ```
-
- 13 Jun, 2018 6 commits
-
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Lon Ilesanmi authored
- Remove unused imports - Edit some comments - Rename Wrapper App Class
-
- 12 Jun, 2018 1 commit
-
-
James Hegedus authored
* remove `predeploy` scripts from `firebase.json` in favour of `npm` `pre` scripts as they are consistent across `deploy` and `serve` commands. (to revisit once Firebase add support in the `firebase.json` for `preserve`) * update deps * workaround some bug where Babel could not resolve the standard `next/babel` config. Explicitly defining this seems to remove the issue. * closes #4562
-
- 11 Jun, 2018 1 commit
-
-
Tim Neutkens authored
Fixes #4581
-
- 10 Jun, 2018 1 commit
-
-
Telegin Evgeniy authored
Hello! I have got an error while building [gh-pages example](https://github.com/zeit/next.js/tree/canary/examples/gh-pages) with next 6.0.3. I have found solution to use CommonJS modules in `.babelrc` This resolves #4227
-
- 09 Jun, 2018 1 commit
-
-
Rafał Ruciński authored
This fixes a missed bug introduced in #4510. Because the regexp was `/-[^-]*/` and not `/-[^-]*$/`, a wrong part of the filename was being removed: ``` bad: 'foo-bar-0123456789abcdef-0123456789abcdef.js' -> 'foo-0123456789abcdef-0123456789abcdef.js' good: 'foo-bar-0123456789abcdef-0123456789abcdef.js' -> 'foo-bar-0123456789abcdef' ``` By a stroke of luck this didn't affect the existing dynamically generated chunks. To prevent regression I've added unit tests for the function that generates the name. Btw. in the original issue (#4433) I used the right regexp, I just used the wrong regexp in #4510. cc @timneutkens
-