language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
vercel
next.js
c8059b9f12939ae2290af7017cc93c03e50abe8f.json
Make sure linting passes
examples/active-class-name/components/Link.js
@@ -1,18 +1,18 @@ -import { withRouter } from 'next/router'; -import Link from 'next/link'; -import React, { Children } from 'react'; +import { withRouter } from 'next/router' +import Link from 'next/link' +import React, { Children } from 'react' const ActiveLink = ({ router, children, ...props }) => { - const chil...
true
Other
vercel
next.js
c8059b9f12939ae2290af7017cc93c03e50abe8f.json
Make sure linting passes
examples/active-class-name/components/Nav.js
@@ -1,5 +1,4 @@ -import Link from './Link'; -import Head from 'next/head'; +import Link from './Link' export default () => ( <nav> @@ -17,15 +16,15 @@ export default () => ( <ul> <li> - <Link activeClassName="active" href="/"> - <a className="nav-link home-link">Home</a> + <Li...
true
Other
vercel
next.js
c8059b9f12939ae2290af7017cc93c03e50abe8f.json
Make sure linting passes
examples/active-class-name/pages/about.js
@@ -1,8 +1,8 @@ -import Nav from '../components/Nav'; +import Nav from '../components/Nav' export default () => ( <div> <Nav /> <p>Hello, I'm About.js</p> </div> -); +)
true
Other
vercel
next.js
c8059b9f12939ae2290af7017cc93c03e50abe8f.json
Make sure linting passes
examples/active-class-name/pages/index.js
@@ -1,8 +1,8 @@ -import Nav from '../components/Nav'; +import Nav from '../components/Nav' export default () => ( <div> <Nav /> <p>Hello, I'm the home page</p> </div> -); +)
true
Other
vercel
next.js
6e44cdef5f877a85d9015002d3f77640c0e1ba21.json
Expose mechanism to monitor render events (#2655) * Allow custom clientBootstrap entrypoint This allows for customization of the client global bootstrap. * Expose render event emitter to client * Include client entry point in npm package
client.js
@@ -0,0 +1 @@ +module.exports = require('./dist/client/index')
true
Other
vercel
next.js
6e44cdef5f877a85d9015002d3f77640c0e1ba21.json
Expose mechanism to monitor render events (#2655) * Allow custom clientBootstrap entrypoint This allows for customization of the client global bootstrap. * Expose render event emitter to client * Include client entry point in npm package
client/index.js
@@ -56,6 +56,8 @@ let ErrorDebugComponent let Component let stripAnsi = (s) => s +export const emitter = new EventEmitter() + export default async ({ ErrorDebugComponent: passedDebugComponent, stripAnsi: passedStripAnsi } = {}) => { // Wait for all the dynamic chunks to get loaded for (const chunkName of chu...
true
Other
vercel
next.js
6e44cdef5f877a85d9015002d3f77640c0e1ba21.json
Expose mechanism to monitor render events (#2655) * Allow custom clientBootstrap entrypoint This allows for customization of the client global bootstrap. * Expose render event emitter to client * Include client entry point in npm package
package.json
@@ -10,6 +10,7 @@ "files": [ "dist", "babel.js", + "client.js", "link.js", "css.js", "head.js",
true
Other
vercel
next.js
6e44cdef5f877a85d9015002d3f77640c0e1ba21.json
Expose mechanism to monitor render events (#2655) * Allow custom clientBootstrap entrypoint This allows for customization of the client global bootstrap. * Expose render event emitter to client * Include client entry point in npm package
server/build/webpack.js
@@ -43,6 +43,7 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet const entries = { 'main.js': [ ...defaultEntries, + ...config.clientBootstrap || [], mainJS ] }
true
Other
vercel
next.js
53a2c5a7fc14dd7b6a32ed27080534eefd2362f8.json
Combine source maps (#3178) * Propagate source maps through combine assets step * Use constant development build id * Move combine assets step before uglify step This ensures that uglify will catch these changes. * Move dynamic chunks step before uglify step This ensures that uglify will catch these cha...
server/build/plugins/combine-assets-plugin.js
@@ -1,3 +1,5 @@ +import { ConcatSource } from 'webpack-sources' + // This plugin combines a set of assets into a single asset // This should be only used with text assets, // otherwise the result is unpredictable. @@ -8,23 +10,28 @@ export default class CombineAssetsPlugin { } apply (compiler) { - compile...
true
Other
vercel
next.js
53a2c5a7fc14dd7b6a32ed27080534eefd2362f8.json
Combine source maps (#3178) * Propagate source maps through combine assets step * Use constant development build id * Move combine assets step before uglify step This ensures that uglify will catch these changes. * Move dynamic chunks step before uglify step This ensures that uglify will catch these cha...
server/build/plugins/dynamic-chunks-plugin.js
@@ -1,39 +1,48 @@ -export default class PagesPlugin { +import { ConcatSource } from 'webpack-sources' + +const isImportChunk = /^chunks[/\\].*\.js$/ +const matchChunkName = /^chunks[/\\](.*)$/ + +class DynamicChunkTemplatePlugin { + apply (chunkTemplate) { + chunkTemplate.plugin('render', function (modules, chunk) ...
true
Other
vercel
next.js
53a2c5a7fc14dd7b6a32ed27080534eefd2362f8.json
Combine source maps (#3178) * Propagate source maps through combine assets step * Use constant development build id * Move combine assets step before uglify step This ensures that uglify will catch these changes. * Move dynamic chunks step before uglify step This ensures that uglify will catch these cha...
server/build/plugins/pages-plugin.js
@@ -1,47 +1,51 @@ +import { ConcatSource } from 'webpack-sources' import { IS_BUNDLED_PAGE, MATCH_ROUTE_NAME } from '../../utils' -export default class PagesPlugin { - apply (compiler) { - compiler.plugin('after-compile', (compilation, callback) => { - const pages = Object - .keys(compilation....
true
Other
vercel
next.js
53a2c5a7fc14dd7b6a32ed27080534eefd2362f8.json
Combine source maps (#3178) * Propagate source maps through combine assets step * Use constant development build id * Move combine assets step before uglify step This ensures that uglify will catch these changes. * Move dynamic chunks step before uglify step This ensures that uglify will catch these cha...
server/build/webpack.js
@@ -149,6 +149,7 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet output: 'app.js' }), new webpack.optimize.UglifyJsPlugin({ + exclude: ['manifest.js', 'commons.js', 'main.js'], compress: { warnings: false }, sourceMap: false })
true
Other
vercel
next.js
53a2c5a7fc14dd7b6a32ed27080534eefd2362f8.json
Combine source maps (#3178) * Propagate source maps through combine assets step * Use constant development build id * Move combine assets step before uglify step This ensures that uglify will catch these changes. * Move dynamic chunks step before uglify step This ensures that uglify will catch these cha...
server/index.js
@@ -408,7 +408,11 @@ export default class Server { } handleBuildId (buildId, res) { - if (this.dev) return true + if (this.dev) { + res.setHeader('Cache-Control', 'no-store, must-revalidate') + return true + } + if (buildId !== this.renderOpts.buildId) { return false } @@ -42...
true
Other
vercel
next.js
53a2c5a7fc14dd7b6a32ed27080534eefd2362f8.json
Combine source maps (#3178) * Propagate source maps through combine assets step * Use constant development build id * Move combine assets step before uglify step This ensures that uglify will catch these changes. * Move dynamic chunks step before uglify step This ensures that uglify will catch these cha...
server/render.js
@@ -96,11 +96,6 @@ async function doRender (req, res, pathname, query, { } const docProps = await loadGetInitialProps(Document, { ...ctx, renderPage }) - // While developing, we should not cache any assets. - // So, we use a different buildId for each page load. - // With that we can ensure, we have unique U...
true
Other
vercel
next.js
4c18678d54947811f1f557c1396e3a3e7ae120cb.json
Create example of activeClassLink using withRouter (#3188)
examples/active-class-name/README.md
@@ -0,0 +1,29 @@ +[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/active-class-name) + +# activeClassName example + +## How to use + +Download the example [or clone the repo](https://github.com/zeit/next.js): + +```bash +curl h...
true
Other
vercel
next.js
4c18678d54947811f1f557c1396e3a3e7ae120cb.json
Create example of activeClassLink using withRouter (#3188)
examples/active-class-name/components/Link.js
@@ -0,0 +1,18 @@ +import { withRouter } from 'next/router'; +import Link from 'next/link'; +import React, { Children } from 'react'; + +const ActiveLink = ({ router, children, ...props }) => { + const child = Children.only(children); + + let className = child.props.className || ''; + if (router.pathname === props.hr...
true
Other
vercel
next.js
4c18678d54947811f1f557c1396e3a3e7ae120cb.json
Create example of activeClassLink using withRouter (#3188)
examples/active-class-name/components/Nav.js
@@ -0,0 +1,31 @@ +import Link from './Link'; +import Head from 'next/head'; + +export default () => ( + <nav> + <style jsx>{` + .active:after { + content: ' (current page)'; + } + + .nav-link { + text-decoration: none; + padding: 10px; + display: block; + } + `}</s...
true
Other
vercel
next.js
4c18678d54947811f1f557c1396e3a3e7ae120cb.json
Create example of activeClassLink using withRouter (#3188)
examples/active-class-name/package.json
@@ -0,0 +1,16 @@ +{ + "name": "active-class-name", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "author": "Remy Sharp <remy@leftlogic.com>", + "dependencies": { + "next": "latest", + "react": "^16.0.0", + "react-dom": "^16.0.0" + ...
true
Other
vercel
next.js
4c18678d54947811f1f557c1396e3a3e7ae120cb.json
Create example of activeClassLink using withRouter (#3188)
examples/active-class-name/pages/about.js
@@ -0,0 +1,8 @@ +import Nav from '../components/Nav'; + +export default () => ( + <div> + <Nav /> + <p>Hello, I'm About.js</p> + </div> +);
true
Other
vercel
next.js
4c18678d54947811f1f557c1396e3a3e7ae120cb.json
Create example of activeClassLink using withRouter (#3188)
examples/active-class-name/pages/index.js
@@ -0,0 +1,8 @@ +import Nav from '../components/Nav'; + +export default () => ( + <div> + <Nav /> + <p>Hello, I'm the home page</p> + </div> +);
true
Other
vercel
next.js
0bdcb8ddc2b63f98817915816745ee3cb2010cbf.json
Add note about NODE_ENV being set automatically
readme.md
@@ -1035,6 +1035,8 @@ Then run `now` and enjoy! Next.js can be deployed to other hosting solutions too. Please have a look at the ['Deployment'](https://github.com/zeit/next.js/wiki/Deployment) section of the wiki. +Note: `NODE_ENV` is properly configured by the `next` subcommands, if absent, to maximize performan...
false
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/root-static-files/package.json
@@ -8,7 +8,7 @@ }, "dependencies": { "next": "latest", - "react": "^15.5.4", - "react-dom": "^15.5.4" + "react": "^16.0.0", + "react-dom": "^16.0.0" } }
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/using-inferno/package.json
@@ -12,8 +12,8 @@ "inferno-server": "^1.4.0", "module-alias": "^2.0.0", "next": "latest", - "react": "^15.6.1", - "react-dom": "^15.6.1" + "react": "^16.0.0", + "react-dom": "^16.0.0" }, "license": "MIT" }
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/using-preact/package.json
@@ -11,8 +11,8 @@ "next": "latest", "preact": "^7.2.0", "preact-compat": "^3.14.0", - "react": "^15.6.1", - "react-dom": "^15.6.1" + "react": "^16.0.0", + "react-dom": "^16.0.0" }, "license": "ISC", "devDependencies": {
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-ant-design/package.json
@@ -10,8 +10,11 @@ "antd": "^2.10.2", "babel-plugin-import": "^1.1.1", "next": "latest", - "react": "^15.5.4", - "react-dom": "^15.5.4" + "react": "^16.0.0", + "react-dom": "^16.0.0" }, - "license": "ISC" + "license": "ISC", + "devDependencies": { + "babel-plugin-transform-decorators...
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-antd-mobile/package.json
@@ -5,8 +5,8 @@ "antd-mobile": "1.4.0", "babel-plugin-import": "^1.2.1", "next": "latest", - "react": "^15.6.1", - "react-dom": "^15.6.1", + "react": "^16.0.0", + "react-dom": "^16.0.0", "require-hacker": "^3.0.0", "svg-sprite-loader": "0.3.1" },
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-freactal/package.json
@@ -10,8 +10,8 @@ "freactal": "^1.1.1", "isomorphic-fetch": "^2.2.1", "next": "latest", - "react": "^15.6.1", - "react-dom": "^15.6.1" + "react": "^16.0.0", + "react-dom": "^16.0.0" }, "license": "ISC" }
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-react-toolbox/package.json
@@ -10,9 +10,9 @@ "dependencies": { "classnames": "^2.2.5", "next": "latest", - "react": "^15.5.4", + "react": "^16.0.0", "react-addons-css-transition-group": "^15.5.2", - "react-dom": "^15.5.4", + "react-dom": "^16.0.0", "react-toolbox": "^2.0.0-beta.8" }, "devDependencies": {
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-react-uwp/package.json
@@ -4,8 +4,8 @@ "dependencies": { "babel-core": "^6.25.0", "next": "latest", - "react": "^15.5.4", - "react-dom": "^15.5.4", + "react": "^16.0.0", + "react-dom": "^16.0.0", "react-uwp": "^1.0.9" }, "scripts": {
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-react-with-styles/package.json
@@ -9,8 +9,8 @@ "dependencies": { "aphrodite": "^1.2.1", "next": "latest", - "react": "^15.6.1", - "react-dom": "^15.6.1", + "react": "^16.0.0", + "react-dom": "^16.0.0", "react-with-styles": "^1.4.0", "react-with-styles-interface-aphrodite": "^1.2.0" },
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-redux-code-splitting/package.json
@@ -10,8 +10,8 @@ "fast-redux": "~0.3.0", "next": "latest", "next-redux-wrapper": "~1.3.2", - "react": "~15.6.1", - "react-dom": "~15.6.1", + "react": "^16.0.0", + "react-dom": "^16.0.0", "react-redux": "~5.0.5", "redux": "~3.7.2", "redux-devtools-extension": "~2.13.2",
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-redux-saga/package.json
@@ -13,8 +13,8 @@ "next": "latest", "next-redux-saga": "1.0.1", "next-redux-wrapper": "1.2.0", - "react": "15.6.1", - "react-dom": "15.6.1", + "react": "^16.0.0", + "react-dom": "^16.0.0", "react-redux": "5.0.5", "redux": "3.7.2", "redux-saga": "0.15.4"
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-webpack-bundle-analyzer/package.json
@@ -11,8 +11,8 @@ "next": "latest", "cross-env": "^5.0.1", "faker": "^4.1.0", - "react": "^15.6.1", - "react-dom": "^15.6.1", + "react": "^16.0.0", + "react-dom": "^16.0.0", "webpack-bundle-analyzer": "^2.8.2" }, "license": "ISC"
true
Other
vercel
next.js
015d06a331e9c67ef3d48b8cdd78b8588f61519a.json
Upgrade React for examples with next@latest (#3196)
examples/with-webpack-bundle-size-analyzer/package.json
@@ -11,8 +11,8 @@ "cross-env": "^5.0.1", "faker": "^4.1.0", "next": "latest", - "react": "^15.6.1", - "react-dom": "^15.6.1", + "react": "^16.0.0", + "react-dom": "^16.0.0", "webpack-bundle-size-analyzer": "^2.7.0" }, "license": "ISC"
true
Other
vercel
next.js
b937ed36449e463b4656e397e596c7508dec85f4.json
Remove extra word (#3193)
readme.md
@@ -62,7 +62,7 @@ npm install --save next react react-dom ``` > Next.js 4 only supports [React 16](https://reactjs.org/blog/2017/09/26/react-v16.0.html).<br/> -> We had to drop React 15 support due to the way how React 16 works and how we use it. +> We had to drop React 15 support due to the way React 16 works and ...
false
Other
vercel
next.js
43148024228beb9bfa87fcbff8595d69678ce185.json
Update styled components for React 16 (#3187) Next 4 only works with React 16, so for this example to work we need an update.
examples/with-styled-components/package.json
@@ -9,8 +9,8 @@ "dependencies": { "babel-plugin-styled-components": "^1.1.5", "next": "latest", - "react": "^15.6.1", - "react-dom": "^15.6.1", + "react": "^16.0.0", + "react-dom": "^16.0.0", "styled-components": "^2.1.0" }, "license": "ISC"
false
Other
vercel
next.js
43b0e6f51420325abf2aed1157a197392364b25d.json
Remove console.logs (#402)
client/next-prefetcher.js
@@ -1,13 +1,14 @@ /* global self */ const CACHE_NAME = 'next-prefetcher-v1' +const log = () => {} self.addEventListener('install', () => { - console.log('Installing Next Prefetcher') + log('Installing Next Prefetcher') }) self.addEventListener('activate', (e) => { - console.log('Activated Next Prefetcher'...
true
Other
vercel
next.js
43b0e6f51420325abf2aed1157a197392364b25d.json
Remove console.logs (#402)
lib/prefetch.js
@@ -84,7 +84,6 @@ class Messenger { this.serviceWorkerState = 'REGISTERED' this.serviceWorkerReadyCallbacks.forEach(cb => cb()) this.serviceWorkerReadyCallbacks = [] - console.log('Next Prefetcher registered') }) } }
true
Other
vercel
next.js
aa6870a4e6266d48c43b6418addde16b0e977326.json
Fix #204 (#401) React addons require React in a special way. That causes Webpack to push React into the app's bundle. This fix adds new externals entries to prevent that.
server/build/webpack.js
@@ -184,7 +184,12 @@ export default async function createCompiler (dir, { hotReload = false, dev = fa [require.resolve('../../lib/link')]: 'next/link', [require.resolve('../../lib/prefetch')]: 'next/prefetch', [require.resolve('../../lib/css')]: 'next/css', - [require.resolve('../../li...
false
Other
vercel
next.js
204d3352735051d47bbecfa7ffdd14d0b5911cf6.json
update example with correct syntax (#383) - was using `]` instead of `}`
README.md
@@ -201,7 +201,7 @@ export default class Error extends React.Component { this.props.statusCode ? `An error ${this.props.statusCode} occurred on server` : 'An error occurred on client' - ]</p> + }</p> ) } }
false
Other
vercel
next.js
b4ccb126d98b13fee364842d4c8467d4d40ffbf9.json
ignore .babelrc on babel-loader
server/build/webpack.js
@@ -107,6 +107,7 @@ export default async function createCompiler (dir, { hotReload = false, dev = fa loader: 'babel', include: nextPagesDir, query: { + babelrc: false, sourceMaps: dev ? 'both' : false, plugins: [ [ @@ -127,6 +128,7 @@ export default async function createCompil...
false
Other
vercel
next.js
a5ae843acaf5b740284c2f0dfd99b0ddf52de799.json
chore(package): update babel-loader to version 6.2.9 (#359)
package.json
@@ -54,7 +54,7 @@ "ansi-html": "0.0.6", "babel-core": "6.20.0", "babel-generator": "6.20.0", - "babel-loader": "6.2.8", + "babel-loader": "6.2.9", "babel-plugin-module-resolver": "2.4.0", "babel-plugin-react-require": "^3.0.0", "babel-plugin-transform-async-to-generator": "6.16.0",
false
Other
vercel
next.js
cf5daae62f56694e0f70aca7fddbf5af761a9d58.json
chore(package): update webpack to version 1.14.0 (#357)
package.json
@@ -86,7 +86,7 @@ "source-map-support": "0.4.6", "strip-ansi": "3.0.1", "url": "0.11.0", - "webpack": "1.13.3", + "webpack": "1.14.0", "webpack-dev-middleware": "1.8.4", "webpack-hot-middleware": "2.13.2", "write-file-webpack-plugin": "3.4.2"
false
Other
vercel
next.js
423dd94748a47a91c5ef4744689ff923142c0818.json
chore(package): update babel-core to version 6.20.0 (#365)
package.json
@@ -52,7 +52,7 @@ }, "dependencies": { "ansi-html": "0.0.6", - "babel-core": "6.18.2", + "babel-core": "6.20.0", "babel-generator": "6.20.0", "babel-loader": "6.2.8", "babel-plugin-module-resolver": "2.4.0",
false
Other
vercel
next.js
fac5c19472afdd91bc11fb0a020f563c8c66925e.json
chore(package): update babel-generator to version 6.20.0 (#366)
package.json
@@ -53,7 +53,7 @@ "dependencies": { "ansi-html": "0.0.6", "babel-core": "6.18.2", - "babel-generator": "6.19.0", + "babel-generator": "6.20.0", "babel-loader": "6.2.8", "babel-plugin-module-resolver": "2.4.0", "babel-plugin-react-require": "^3.0.0",
false
Other
vercel
next.js
2edbab793480cde4cb8fe17b75d3933f4386431b.json
chore(package): update babel-runtime to version 6.20.0 (#368)
package.json
@@ -63,7 +63,7 @@ "babel-plugin-transform-runtime": "6.15.0", "babel-preset-es2015": "6.18.0", "babel-preset-react": "6.16.0", - "babel-runtime": "6.18.0", + "babel-runtime": "6.20.0", "cross-spawn": "5.0.1", "del": "2.2.2", "domready": "1.0.8",
false
Other
vercel
next.js
249a0c40078d88308e84401cc195856068df4d6b.json
append bundle script to body (#353)
lib/document.js
@@ -45,7 +45,7 @@ function createClientScript ({ dev, cdn }) { script.onload = function () { fn(null) } script.onerror = fn script.crossorigin = 'anonymous' - document.head.appendChild(script) + document.body.appendChild(script) } })() `}} />
false
Other
vercel
next.js
f61335066bf6c098541ee14b5f7f587281700f99.json
Update package.json (#346) Fix following issue in Docker https://github.com/IanMitchell/is-windows-bash/pull/2 https://github.com/zeit/next.js/issues/344
package.json
@@ -71,7 +71,7 @@ "glamor": "2.20.12", "glob-promise": "2.0.0", "htmlescape": "1.1.1", - "is-windows-bash": "1.0.2", + "is-windows-bash": "1.0.3", "json-loader": "0.5.4", "loader-utils": "0.2.16", "minimist": "1.2.0",
false
Other
vercel
next.js
0b20273c778da61bc8ecee1a70e1d9c3cc168bcd.json
remove workaround for react-hot-loader
lib/app.js
@@ -53,11 +53,6 @@ export default class App extends Component { render () { const { Component, props } = this.state - if (typeof window === 'undefined') { - // workaround for https://github.com/gaearon/react-hot-loader/issues/283 - return <Component {...props} /> - } - return <AppContaine...
false
Other
vercel
next.js
e1a231cd6807f06989f4440e84c373be2f169d6d.json
remove FriendlyErrorsWebpackPlugin option
server/build/webpack.js
@@ -3,12 +3,12 @@ import { createHash } from 'crypto' import webpack from 'webpack' import glob from 'glob-promise' import WriteFilePlugin from 'write-file-webpack-plugin' +import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin' import UnlinkFilePlugin from './plugins/unlink-file-plugin' import Wa...
false
Other
vercel
next.js
c8ba9bb88d84f91af88c03432fb61f6c784585aa.json
chore(package): update glamor to version 2.20.12 (#328)
package.json
@@ -68,7 +68,7 @@ "del": "2.2.2", "domready": "1.0.8", "friendly-errors-webpack-plugin": "1.1.1", - "glamor": "2.20.8", + "glamor": "2.20.12", "glob-promise": "2.0.0", "htmlescape": "1.1.1", "is-windows-bash": "1.0.2",
false
Other
vercel
next.js
9950ee73a3b8b45c98d095b880bf1ca4c257a2b8.json
Remove line break between badges (#330)
README.md
@@ -2,7 +2,6 @@ [![Build Status](https://travis-ci.org/zeit/next.js.svg?branch=master)](https://travis-ci.org/zeit/next.js) [![Coverage Status](https://coveralls.io/repos/zeit/next.js/badge.svg?branch=master)](https://coveralls.io/r/zeit/next.js?branch=master) - [![Slack Channel](https://zeit-slackin.now.sh/badge....
false
Other
vercel
next.js
6ca52f3ee22173606131cbdbab50252b3868680b.json
use template literals for console.log
bin/next-dev
@@ -23,7 +23,7 @@ clean(dir) .then(async () => { const srv = new Server({ dir, dev: true, hotReload: true }) await srv.start(argv.port) - console.log('> Ready on http://localhost:%d', argv.port) + console.log(`> Ready on http://localhost:${argv.port}`) // Check if pages dir exists and warn if not if (!...
true
Other
vercel
next.js
6ca52f3ee22173606131cbdbab50252b3868680b.json
use template literals for console.log
bin/next-start
@@ -20,7 +20,7 @@ const dir = resolve(argv._[0] || '.') const srv = new Server({ dir }) srv.start(argv.port) .then(() => { - console.log('> Ready on http://localhost:%d', argv.port) + console.log(`> Ready on http://localhost:${argv.port}`) }) .catch((err) => { console.error(err)
true
Other
vercel
next.js
8a2981746b7083bc60d75f4a4b9374936fffd50e.json
Fix constructor declaration in HeadManager (#321)
client/head-manager.js
@@ -3,7 +3,7 @@ import HTMLDOMPropertyConfig from 'react-dom/lib/HTMLDOMPropertyConfig' const DEFAULT_TITLE = '' export default class HeadManager { - constuctor () { + constructor () { this.requestId = null }
false
Other
vercel
next.js
214c885b90722708db6a3febbbb80f90c8750eb2.json
remove unnecessary escape character for lint
server/build/webpack.js
@@ -72,7 +72,7 @@ export default async function createCompiler (dir, { hotReload = false, dev = fa } const babelRuntimePath = require.resolve('babel-runtime/package') - .replace(/[\\\/]package\.json$/, '') + .replace(/[\\/]package\.json$/, '') const loaders = [{ test: /\.js$/,
false
Other
vercel
next.js
c36e0d98fdfadc6965330b9fa7af401c060b5c1b.json
chore(package): update standard to version 8.6.0 (#292)
package.json
@@ -77,7 +77,7 @@ "gulp-notify": "2.2.0", "husky": "0.11.9", "run-sequence": "1.2.2", - "standard": "8.5.0", + "standard": "8.6.0", "webpack-stream": "3.2.0" } }
false
Other
vercel
next.js
39c6536bccf2ff6d51f5ab91b3883df72400ba11.json
fix a test
test/index.js
@@ -15,8 +15,8 @@ test(async t => { test(async t => { const html = await render('/css') - t.true(html.includes('.css-im3wl1')) - t.true(html.includes('<div class="css-im3wl1">This is red</div>')) + t.regex(html, /\.css-\w+/) + t.regex(html, /<div class="css-\w+">This is red<\/div>/) }) test(async t => {
false
Other
vercel
next.js
94b1fb0d1041273fcee95c18db75bebb16c4590e.json
chore(package): update glamor to version 2.20.8 (#317)
package.json
@@ -43,7 +43,7 @@ "babel-runtime": "6.18.0", "cross-spawn": "5.0.1", "del": "2.2.2", - "glamor": "2.18.2", + "glamor": "2.20.8", "glob-promise": "2.0.0", "htmlescape": "1.1.1", "is-windows-bash": "1.0.1",
false
Other
vercel
next.js
7a66870af9734c2f319b5359bc22301f1034ecaa.json
Add Polling for Bash on Windows (#302) * Add Polling for Bash on Windows Fixes #166 * Add Windows Bash Dependency
package.json
@@ -46,6 +46,7 @@ "glamor": "2.18.2", "glob-promise": "2.0.0", "htmlescape": "1.1.1", + "is-windows-bash": "1.0.1", "json-loader": "0.5.4", "loader-utils": "0.2.16", "minimist": "1.2.0",
true
Other
vercel
next.js
7a66870af9734c2f319b5359bc22301f1034ecaa.json
Add Polling for Bash on Windows (#302) * Add Polling for Bash on Windows Fixes #166 * Add Windows Bash Dependency
server/hot-reloader.js
@@ -1,6 +1,7 @@ import { join, relative, sep } from 'path' import webpackDevMiddleware from 'webpack-dev-middleware' import webpackHotMiddleware from 'webpack-hot-middleware' +import isWindowsBash from 'is-windows-bash' import webpack from './build/webpack' import read from './read' @@ -106,6 +107,14 @@ export d...
true
Other
vercel
next.js
10b815b9c9a8b4855df326c3e8bc8e4a02364fae.json
Add react-require to avoid importing React (#295) * Add react-require * Add babel-plugin-react-require
package.json
@@ -33,6 +33,7 @@ "babel-generator": "6.19.0", "babel-loader": "6.2.8", "babel-plugin-module-resolver": "2.3.0", + "babel-plugin-react-require": "^3.0.0", "babel-plugin-transform-async-to-generator": "6.16.0", "babel-plugin-transform-class-properties": "6.19.0", "babel-plugin-transform-...
true
Other
vercel
next.js
10b815b9c9a8b4855df326c3e8bc8e4a02364fae.json
Add react-require to avoid importing React (#295) * Add react-require * Add babel-plugin-react-require
server/build/webpack.js
@@ -118,6 +118,7 @@ export default async function createCompiler (dir, { hotReload = false, dev = fa query: { presets: ['es2015', 'react'], plugins: [ + require.resolve('babel-plugin-react-require'), require.resolve('babel-plugin-transform-async-to-generator'), require.resolv...
true
Other
vercel
next.js
c7ba914f527ebcfe084cb0e36946b9dee00d25fa.json
Handle runtime errors (#268) * display runtime errors by error-debug * server: fix status * render Error component on client error * server: render runtime errors of error template * server: handle errors of error template on render404 * server: add a comment * server: refactor renderJSON * recove...
README.md
@@ -188,13 +188,17 @@ import React from 'react' export default class Error extends React.Component { static getInitialProps ({ res, xhr }) { - const statusCode = res ? res.statusCode : xhr.status + const statusCode = res ? res.statusCode : (xhr ? xhr.status : null) return { statusCode } } rende...
true
Other
vercel
next.js
c7ba914f527ebcfe084cb0e36946b9dee00d25fa.json
Handle runtime errors (#268) * display runtime errors by error-debug * server: fix status * render Error component on client error * server: render runtime errors of error template * server: handle errors of error template on render404 * server: add a comment * server: refactor renderJSON * recove...
client/next.js
@@ -7,12 +7,17 @@ import App from '../lib/app' import evalScript from '../lib/eval-script' const { - __NEXT_DATA__: { component, props, ids, err } + __NEXT_DATA__: { component, errorComponent, props, ids, err } } = window const Component = evalScript(component).default +const ErrorComponent = evalScript(error...
true
Other
vercel
next.js
c7ba914f527ebcfe084cb0e36946b9dee00d25fa.json
Handle runtime errors (#268) * display runtime errors by error-debug * server: fix status * render Error component on client error * server: render runtime errors of error template * server: handle errors of error template on render404 * server: add a comment * server: refactor renderJSON * recove...
client/webpack-hot-middleware-client.js
@@ -16,6 +16,13 @@ const handlers = { } next.router.reload(route) + }, + change (route) { + const { Component } = next.router.components[route] || {} + if (Component && Component.__route === '/_error-debug') { + // reload to recover from runtime errors + next.router.reload(route) + } ...
true
Other
vercel
next.js
c7ba914f527ebcfe084cb0e36946b9dee00d25fa.json
Handle runtime errors (#268) * display runtime errors by error-debug * server: fix status * render Error component on client error * server: render runtime errors of error template * server: handle errors of error template on render404 * server: add a comment * server: refactor renderJSON * recove...
lib/router.js
@@ -3,15 +3,16 @@ import evalScript from './eval-script' import shallowEquals from './shallow-equals' export default class Router { - constructor (url, initialData) { + constructor (url, { Component, ErrorComponent, ctx } = {}) { const parsed = parse(url, true) // represents the current component key ...
true
Other
vercel
next.js
c7ba914f527ebcfe084cb0e36946b9dee00d25fa.json
Handle runtime errors (#268) * display runtime errors by error-debug * server: fix status * render Error component on client error * server: render runtime errors of error template * server: handle errors of error template on render404 * server: add a comment * server: refactor renderJSON * recove...
pages/_error-debug.js
@@ -5,12 +5,12 @@ import style from 'next/css' export default class ErrorDebug extends React.Component { static getInitialProps ({ err }) { - const { message, module } = err - return { message, path: module.rawRequest } + const { name, message, stack, module } = err + return { name, message, stack, pa...
true
Other
vercel
next.js
c7ba914f527ebcfe084cb0e36946b9dee00d25fa.json
Handle runtime errors (#268) * display runtime errors by error-debug * server: fix status * render Error component on client error * server: render runtime errors of error template * server: handle errors of error template on render404 * server: add a comment * server: refactor renderJSON * recove...
pages/_error.js
@@ -1,19 +1,21 @@ import React from 'react' -import style, { merge } from 'next/css' +import style from 'next/css' export default class Error extends React.Component { static getInitialProps ({ res, xhr }) { - const statusCode = res ? res.statusCode : xhr.status + const statusCode = res ? res.statusCode : ...
true
Other
vercel
next.js
c7ba914f527ebcfe084cb0e36946b9dee00d25fa.json
Handle runtime errors (#268) * display runtime errors by error-debug * server: fix status * render Error component on client error * server: render runtime errors of error template * server: handle errors of error template on render404 * server: add a comment * server: refactor renderJSON * recove...
server/hot-reloader.js
@@ -17,6 +17,7 @@ export default class HotReloader { this.prevAssets = null this.prevChunkNames = null this.prevFailedChunkNames = null + this.prevChunkHashes = null } async run (req, res) { @@ -66,6 +67,8 @@ export default class HotReloader { .reduce((a, b) => a.concat(b), []) ....
true
Other
vercel
next.js
c7ba914f527ebcfe084cb0e36946b9dee00d25fa.json
Handle runtime errors (#268) * display runtime errors by error-debug * server: fix status * render Error component on client error * server: render runtime errors of error template * server: handle errors of error template on render404 * server: add a comment * server: refactor renderJSON * recove...
server/index.js
@@ -18,7 +18,7 @@ export default class Server { this.run(req, res) .catch((err) => { console.error(err) - res.status(500) + res.statusCode = 500 res.end('error') }) }) @@ -73,96 +73,112 @@ export default class Server { } async render (req, res) { - co...
true
Other
vercel
next.js
c7ba914f527ebcfe084cb0e36946b9dee00d25fa.json
Handle runtime errors (#268) * display runtime errors by error-debug * server: fix status * render Error component on client error * server: render runtime errors of error template * server: handle errors of error template on render404 * server: add a comment * server: refactor renderJSON * recove...
server/render.js
@@ -20,8 +20,15 @@ export async function render (url, ctx = {}, { const mod = await requireModule(join(dir, '.next', 'dist', 'pages', path)) const Component = mod.default || mod - const props = await (Component.getInitialProps ? Component.getInitialProps(ctx) : {}) - const component = await read(join(dir, '.n...
true
Other
vercel
next.js
0f34b9b5684e6488332315da3165b752f84733f2.json
fix: address merge conflict
package.json
@@ -84,25 +84,15 @@ "url": "0.11.0", "webpack": "1.13.3", "webpack-dev-server": "1.16.2", -<<<<<<< HEAD - "sockjs-client": "1.1.1", "write-file-webpack-plugin": "3.4.2" }, "devDependencies": { "ava": "0.17.0", "babel-eslint": "7.1.1", "babel-plugin-transform-remove-strict-mod...
false
Other
vercel
next.js
12003f307b46a268c68ca3cfe7c41f9dc8dcde93.json
feat: run individual tests with ava script
package.json
@@ -18,9 +18,10 @@ "build": "gulp", "pretest": "npm run lint", "test": "gulp test", - "lint": "standard && standard bin/*", "html-report": "nyc report --reporter=html", + "ava": "cross-env NODE_ENV=test nyc ava --verbose", "coveralls": "nyc report --reporter=text-lcov | coveralls", + "...
false
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
.babelrc
@@ -0,0 +1,14 @@ +{ + "presets": ["es2015", "react"], + "plugins": [ + "transform-async-to-generator", + "transform-object-rest-spread", + "transform-class-properties", + "transform-runtime" + ], + "env": { + "test": { + "plugins": ["istanbul"] + } + } +}
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
.gitignore
@@ -10,3 +10,7 @@ npm-debug.log # other .next + +# coverage +.nyc_output +coverage
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
.travis.yml
@@ -6,3 +6,4 @@ node_js: cache: directories: - node_modules +after_script: npm run coveralls
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
README.md
@@ -1,6 +1,8 @@ <img width="112" alt="screen shot 2016-10-25 at 2 37 27 pm" src="https://cloud.githubusercontent.com/assets/13041/19686250/971bf7f8-9ac0-11e6-975c-188defd82df1.png"> [![Build Status](https://travis-ci.org/zeit/next.js.svg?branch=master)](https://travis-ci.org/zeit/next.js) +[![Coverage Status](https...
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
gulpfile.js
@@ -1,3 +1,4 @@ +const fs = require('fs') const gulp = require('gulp') const babel = require('gulp-babel') const cache = require('gulp-cached') @@ -8,15 +9,7 @@ const sequence = require('run-sequence') const webpack = require('webpack-stream') const del = require('del') -const babelOptions = { - presets: ['es20...
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
lib/document.js
@@ -1,6 +1,8 @@ import React from 'react' import htmlescape from 'htmlescape' -import pkg from '../../package.json' +import readPkgUp from 'read-pkg-up' + +const pkg = readPkgUp.sync({normalize: false}).pkg export default ({ head, css, html, data, dev, staticMarkup, cdn }) => { return <html>
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
package.json
@@ -16,13 +16,35 @@ }, "scripts": { "build": "gulp", - "test": "npm run lint && gulp test", + "pretest": "npm run lint", + "test": "gulp test", "lint": "standard && standard bin/*", + "html-report": "nyc report --reporter=html", + "coveralls": "nyc report --reporter=text-lcov | coveralls"...
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
test/fixtures/basic/pages/head.js
@@ -1,4 +1,3 @@ - import React from 'react' import Head from 'next/head'
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
test/fixtures/basic/pages/link.js
@@ -0,0 +1,5 @@ +import React from 'react' +import Link from 'next/link' +export default () => ( + <div>Hello World. <Link href='/about'>About</Link></div> +)
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
test/integration.test.js
@@ -7,35 +7,40 @@ const dir = join(__dirname, 'fixtures', 'basic') test.before(() => build(dir)) -test(async t => { +test('renders a stateless component', async t => { const html = await render('/stateless') t.true(html.includes('<meta charset="utf-8" class="next-head"/>')) t.true(html.includes('<h1>My co...
true
Other
vercel
next.js
c56fde89c38507681bfae31bf1d54184fdbad1b7.json
chore: add test coverage
test/lib/shallow-equals.test.js
@@ -0,0 +1,39 @@ +import test from 'ava' +import shallowEquals from '../../lib/shallow-equals' + +test('returns true if all key/value pairs match', t => { + t.true(shallowEquals({ + a: 1, + b: 2, + c: 99 + }, { + a: 1, + b: 2, + c: 99 + })) +}) + +test('returns false if any key/value pair is differ...
true
Other
vercel
next.js
832425e67e1e4e04c601dfc7bcbcd03cff0c564d.json
fix w3c warnings (#3572)
lib/page-loader.js
@@ -74,7 +74,6 @@ export default class PageLoader { const script = document.createElement('script') const url = `${this.assetPrefix}/_next/${encodeURIComponent(this.buildId)}/page${scriptRoute}` script.src = url - script.type = 'text/javascript' script.onerror = () => { const error = new E...
true
Other
vercel
next.js
832425e67e1e4e04c601dfc7bcbcd03cff0c564d.json
fix w3c warnings (#3572)
server/document.js
@@ -132,7 +132,6 @@ export class NextScript extends Component { return ( <script key={filename} - type='text/javascript' src={`${assetPrefix}/_next/${hash}/${filename}`} {...additionalProps} /> @@ -163,7 +162,6 @@ export class NextScript extends Component { ...
true
Other
vercel
next.js
695c8836d45b814d670d23ae85f330431f9f0df4.json
Upgrade react-hot-loader to beta 23 (#3843)
package.json
@@ -90,7 +90,7 @@ "pkg-up": "2.0.0", "prop-types": "15.6.0", "prop-types-exact": "1.1.1", - "react-hot-loader": "4.0.0-beta.22", + "react-hot-loader": "4.0.0-beta.23", "recursive-copy": "2.0.6", "resolve": "1.5.0", "send": "0.16.1",
true
Other
vercel
next.js
695c8836d45b814d670d23ae85f330431f9f0df4.json
Upgrade react-hot-loader to beta 23 (#3843)
yarn.lock
@@ -3158,10 +3158,14 @@ hoek@4.x.x: version "4.2.0" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" -hoist-non-react-statics@2.3.1, hoist-non-react-statics@^2.3.1: +hoist-non-react-statics@2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/...
true
Other
vercel
next.js
c204cdd91e62e91ecdb14cd6bc4588335ccf5a4e.json
Read compiler.context instead of this.context (#3839)
server/on-demand-entry-handler.js
@@ -39,7 +39,7 @@ export default function onDemandEntryHandler (devMiddleware, compilers, { const allEntries = Object.keys(entries).map((page) => { const { name, entry } = entries[page] entries[page].status = BUILDING - return addEntry(compilation, this.context, name, entry) + ret...
false
Other
vercel
next.js
97aef52defea2cd497353734d2ee4319fd74dd63.json
Update tsconfig.json in with-typescript example (#3837) Fixes https://github.com/zeit/next.js/pull/3698#issuecomment-366442816
examples/with-typescript/tsconfig.json
@@ -3,6 +3,7 @@ "compilerOptions": { "target": "esnext", "module": "esnext", + "jsx": "preserve", "allowJs": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true,
false
Other
vercel
next.js
7e756ee5d94c0c483432bc7e0d05eb0093c81f4f.json
Expose totalPages to the webpack decorator (#3824)
server/build/webpack.js
@@ -314,7 +314,7 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer } if (typeof config.webpack === 'function') { - webpackConfig = config.webpack(webpackConfig, {dir, dev, isServer, buildId, config, defaultLoaders}) + webpackConfig = config.webpack(webpackConfig, {dir, dev...
false
Other
vercel
next.js
9fb8b93ed919fa8631a4a7f38dfda5a308f54d91.json
Use indexOf instead of startsWith (#3758) * Use indexOf instead of startsWith This fixes an IE11 regression, see #3755 * Lint the code
lib/head.js
@@ -60,7 +60,7 @@ function unique () { const metaCategories = {} return (h) => { - if (h.key && h.key.startsWith('.$')) { + if (h.key && h.key.indexOf('.$') === 0) { if (keys.has(h.key)) return false keys.add(h.key) }
false
Other
vercel
next.js
69b236b97602e59a9561d20a0d0ed66b8e746218.json
Upgrade Firebase and Firebase-Admin (#3786) Firebase and Firebase Admin versions are upgraded.
examples/with-firebase-authentication/package.json
@@ -10,8 +10,8 @@ "body-parser": "^1.17.1", "express": "^4.14.0", "express-session": "^1.15.2", - "firebase": "^3.7.5", - "firebase-admin": "^4.2.0", + "firebase": "^4.9.1", + "firebase-admin": "^5.8.2", "isomorphic-unfetch": "2.0.0", "next": "latest", "react": "^16.0.0",
false
Other
vercel
next.js
bc185878e8afae7de6598b5b7538170756143ec1.json
change mergeMap -> map in redux-observable example (#3794) Using `mergeMap` with an inner Observable `of` is the same as using `map` by itself, so this is more idiomatic and clear.
examples/with-redux-observable/redux/epics.js
@@ -1,6 +1,6 @@ import { interval } from 'rxjs/observable/interval' import { of } from 'rxjs/observable/of' -import { takeUntil, mergeMap, catchError } from 'rxjs/operators' +import { takeUntil, mergeMap, catchError, map } from 'rxjs/operators' import { combineEpics, ofType } from 'redux-observable' import ajax fro...
false
Other
vercel
next.js
0e044828ea85fb58d49373b9e2dac7a5c2cbf4ff.json
Add example of next-plugin composition (#3800) * Add example of next-plugin composition * Add require statements to the example
readme.md
@@ -1088,6 +1088,21 @@ Some commonly asked for features are available as modules: *Warning: The `webpack` function is executed twice, once for the server and once for the client. This allows you to distinguish between client and server configuration using the `isServer` property* +Multiple configurations can be co...
false
Other
vercel
next.js
7b975d21562490788079a5161238d9652e2d4031.json
examples: Add an example for the next-css plugin (#3739) - with css modules - with additional webpack config - with post css - without css modules Fix #3699
examples/with-next-css/README.md
@@ -0,0 +1,40 @@ +[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-next-css) + +# next-css example + +## How to use + +### Using `create-next-app` + +Download [`create-next-app`](https://github.com/segmentio/create-next-app...
true
Other
vercel
next.js
7b975d21562490788079a5161238d9652e2d4031.json
examples: Add an example for the next-css plugin (#3739) - with css modules - with additional webpack config - with post css - without css modules Fix #3699
examples/with-next-css/next.config.js
@@ -0,0 +1,16 @@ +const withCSS = require('@zeit/next-css') +/* Without CSS Modules, with PostCSS */ +module.exports = withCSS() + +/* With CSS Modules */ +// module.exports = withCSS({ cssModules: true }) + +/* With additional configuration on top of CSS Modules */ +/* +module.exports = withCSS({ + cssModules: true, ...
true
Other
vercel
next.js
7b975d21562490788079a5161238d9652e2d4031.json
examples: Add an example for the next-css plugin (#3739) - with css modules - with additional webpack config - with post css - without css modules Fix #3699
examples/with-next-css/package.json
@@ -0,0 +1,16 @@ +{ + "name": "with-css-modules", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "@zeit/next-css": "0.0.7", + "next": "5.0.0", + "react": "16.2.0", + "react-dom": "16.2.0" ...
true
Other
vercel
next.js
7b975d21562490788079a5161238d9652e2d4031.json
examples: Add an example for the next-css plugin (#3739) - with css modules - with additional webpack config - with post css - without css modules Fix #3699
examples/with-next-css/pages/_document.js
@@ -0,0 +1,23 @@ +/* +In production the stylesheet is compiled to .next/static/style.css and served from /_next/static/style.css + +You have to include it into the page using either next/head or a custom _document.js, as is being done in this file. +*/ + +import Document, { Head, Main, NextScript } from 'next/document'...
true