- 11 Sep, 2018 2 commits
-
-
Tim Neutkens authored
-
Tim Neutkens authored
Solves inconsistent loading issues when one bundle is loaded faster than the other Fixes zeit/next-plugins#244 Fixes #4997 Fixes #4620
-
- 10 Sep, 2018 1 commit
-
-
Kyle Holmberg authored
Update next.config in with-webpack-bundle-analyzer example to avoid issue with Next.js in CI (#5135) See: https://spectrum.chat/thread/030243b0-7ebf-434c-8e02-5f54ea30f3b6 Build works now
💃
-
- 09 Sep, 2018 2 commits
-
-
Tim Neutkens authored
-
Tim Neutkens authored
* Add test for /_next/development route * Make sure useFileSystemPublicRoute: false only disables filesystem routing * Bring back comment * Add useFileSystemPublicRoutes tests
-
- 08 Sep, 2018 1 commit
-
-
Tim Neutkens authored
Fixes #5125 I'm not sure if this is a bug in babel-loader / babel-core or not. But this will at least temporary fix it till I hear back from @loganfsmyth
🙏
-
- 07 Sep, 2018 4 commits
-
-
Tim Neutkens authored
-
Tim Neutkens authored
Fixes #5114 Also adds a test for it.
-
Evan Jacobs authored
you folks should really use semver ranges, but since greenkeeper is no longer running for this branch things have fallen behind in particular, there seems to be an incompatibility with multiple v2.x versions of this package in the same bundle as displayed here: styled-components/styled-components#1972 When I force resolution to a particular h-n-r-s version, the issue goes away. This is true for both next 6 and next 7 canary.
-
Julia Qiu authored
Probably an oversight but currently env preset's `modules` option always evaluates to 'auto'. We probably want it to be set to false, especially in prod, to have Webpack handle modules natively.
-
- 06 Sep, 2018 2 commits
-
-
Tim Neutkens authored
-
Keith Grennan authored
Though it sounds like some folks do run getDataFromTree() on the client in order to avoid loading states, it's non-standard usage and potentially confusing. Also it's inconsistent with the other with-apollo examples.
-
- 05 Sep, 2018 6 commits
-
-
Tim Neutkens authored
`__next-error` is no longer needed as we always render in the `__next` div since a while.
-
Tim Neutkens authored
-
Dmitriy authored
* 1) Added React import 2) Removed unusable code. * Removed unusable import App from next/app
-
Tim Neutkens authored
Makes the server error overlay white so it doesn’t flicker when the error is hydrated into the client overlay
-
Tim Neutkens authored
-
Jacob Page authored
The `with-flow` sample has some obsolete definitions which are unused by the sample code. Removing the un-imported declarations is the easiest approach.
-
- 04 Sep, 2018 13 commits
-
-
Diogo Dutra authored
Fix on relay script to proper ignore schema files added graphql as explict dependency
-
Emmanuel Letallieur authored
Hi In the current version of the example __custom-server-typescript__, types are never checked. For instance, change the following line : ``` const dev = process.env.NODE_ENV !== 'production' ``` by : ``` const dev: number = process.env.NODE_ENV !== 'production' ``` then run `npm run dev`. The application launches perfectly, no error is thrown. In dev environnement, it is preferable to check types all the time, to get immediate feedback. This PR activates type checking. Only when using nodemon, so no impact on production. Now the above code will (rightfully) refuse to compile : ``` TSError: ⨯ Unable to compile TypeScript server/index.ts (6,7): Type 'boolean' is not assignable to type 'number' ```
-
Tim Neutkens authored
-
Tim Neutkens authored
Removes `module.exports` so that `module` is no longer required Ref: https://github.com/zeit/next.js/pull/4943#discussion_r213232263 This saves 15 bytes from every client bundle + 9 bytes from the initial HTML.
-
Nathaniel Hill authored
@timneutkens This simple change seems to work for me: ``` const ignored = [ '**/.*', 'node_modules' ] ``` I believe the regex is used here to try and work on windows as well. So, I wasted a bunch of time trying to figure out how to use a regex and/or the `path` module to ignore the parent directories until I noticed the following: > glob patterns are not filepaths. They are a type of regular language that is converted to a JavaScript regular expression. Thus, when forward slashes are defined in a glob pattern, the resulting regular expression will match windows or POSIX path separators just fine. this is from the [anymatch](https://github.com/micromatch/anymatch) documentation which is what webpack uses accoring to this: https://webpack.js.org/configuration/watch/#watchoptions-ignored I've verified this glob pattern solves the problem in my environment, can someone test and verify that this works on windows?👍 -
Kelly Burke authored
I simplified the example by removing `.eslintrc.js` and related packages, as well as `nodemon`. I also added a description in the README to address the question by @kachkaev in the original pull request (#4163).
-
Don Alvarez authored
I think I accidentally deleted the branch my prior PR was based on before you had a chance to merge or decide whether to merge. In case I borked things with that delete, I'm resubmitting the PR and figuring you can close one or the other or both as desired. Original notes: Based on with-mobx-state-tree, but typescript instead of javascript Aside from a few bits of typing and renaming .js files to .ts and .tsx, most of the the edits are to avoid warnings and errors when running the code through tslint (which can be done via the `npm run tslint` command in the example if desired). To keep this example simple, the `<styled>` component (which is used by the javascript-based with-redux and with-mobx-state-tree examples for the clock component) is not used in this example. The `<styled>` library can of course be used with typescript but (I think) it requires a more complicated set of typescript and babel .configs than is needed for most other components and libraries, so I'm just directly styling the one formerly `<styled>` div to keep things simple and broadly applicable.
-
A K authored
-
Tim Neutkens authored
Related #4659 Adds the possibility for users to copy files inside of `exportPathMap`. This allows for adding `robots.txt` `sitemap.xml` etc. another use case is for https://github.com/hanford/next-offline, currently it's manually reading the buildId in `exportPathMap`. To allow users to do this we'll introduce a new parameter holding an object with the following keys: - `dev` - `true` when `exportPathMap` is being called in development. `false` when running `next export`. In development `exportPathMap` is used to define routes and behavior like copying files is not required. - `dir` - Absolute path to the project directory - `outDir` - Absolute path to the `out` directory (configurable with `-o` or `--outdir`). When `dev` is `true` the value of `outDir` will be `null`. - `distDir` - Absolute path to the `.next` directory (configurable using the `distDir` config key) - `buildId` - The buildId the export is running for Example usage: ```js // next.config.js const fs = require('fs') const {join} = require('path') const {promisify} = require('util') const copyFile = promisify(fs.copyFile) module.exports = { exportPathMap: async function (defaultPathMap, {dev, dir, outDir, distDir, buildId}) { if(dev) { return defaultPathMap } // This will copy robots.txt from your project root into the out directory await copyFile(join(dir, 'robots.txt'), join(outDir, 'robots.txt')) return defaultPathMap } } ```
-
Tim Neutkens authored
This route is no longer needed
-
Tomas Roos authored
-
Tim Neutkens authored
-
Tim Neutkens authored
* Rename static to export in integration tests * Move export functionality into it’s own directory * Fix path
-
- 03 Sep, 2018 8 commits
-
-
Henrik Wenz authored
> Workspaces are a new way to setup your package architecture that’s available by default starting from Yarn 1.0. It allows you to setup multiple packages in such a way that you only need to run yarn install once to install all of them in a single pass. - [x] Tested in development mode - [x] Tested in production mode - [x] Tested with deployment https://with-yarn-workspaces-hwzubdlkul.now.sh/ - [x] Added transpile module example Closes #3638
-
Tim Neutkens authored
-
Tim Neutkens authored
Fixes #5021
-
Don Alvarez authored
Pulling out a few core points from the readme... This example builds from /src into /dist, managing the different expectations of express.js (es5, commonjs) and next.js (es6) by using a pair of tsconfig.json files, both of which are run by `npm run build-ts` or any of the other npm targets. Hot module reloading is largely but not completely wired up (nodemon is watching /dist but tsc isn't set up to watch /src and transpile changes in /src to /dist automatically (that's mainly because I wasn't sure how to start both nodemon and a pair of tsc watchers and be confident all would get shut down when the user killed dev mode). The readme suggests running `npm run build-ts` manually in another window to push changes from /src into /dev and on into the browser. tslint is also wired up via `npm run tslint`
-
Tim Neutkens authored
## Minor changes When `NODE_ENV=test` is used we'll now apply the `'auto'` configuration for modules transformation. Which causes Babel to check if the current environment needs to be transformed or not. In practice this means that the following `.babelrc` is not needed anymore: **OLD**: ```json { "env": { "development": { "presets": ["next/babel"] }, "production": { "presets": ["next/babel"] }, "test": { "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]] } } } ``` **NEW**: ``` { "presets": ["next/babel"] } ``` ## Patches `@babel/preset-react` has a `development` option that automatically applies a development-time plugin we manually applied before (`@babel/plugin-transform-react-jsx-source`). It also adds another development-time plugin that is said to make debugging/errors clearer: `@babel/plugin-transform-react-jsx-self` which we didn't apply before. Overall this means we can take advantage of preset-react to provide these plugins. -
George Pantazis authored
Currently, using `as` will cause the router to think the URL is not changing in the case where you're re-rendering the same page with a different route. This would most likely be an issue for custom servers which are using shallow routing. This should be an invisible change for non-custom-server users, since `as` is defaulted to `url` if not set. This should resolve #3065.
-
Tim Neutkens authored
-
Tim Neutkens authored
-
- 02 Sep, 2018 1 commit
-
-
Bertrand Marron authored
* Keep chunks filenames in production mode * Add test for new `[name]` behavior * Rename static/dll to static/development/dll
-