Skip to content

Commit

Permalink
[docs] Bump next to 9.5.0 (#21975)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Jul 29, 2020
1 parent 14b5c35 commit 83c0bee
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 126 deletions.
15 changes: 6 additions & 9 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ module.exports = {
);
}

config.resolve.alias['react-dom$'] = 'react-dom/profiling';
config.resolve.alias['scheduler/tracing'] = 'scheduler/tracing-profiling';

// next includes node_modules in webpack externals. Some of those have dependencies
// on the aliases defined above. If a module is an external those aliases won't be used.
// We need tell webpack to not consider those packages as externals.
Expand Down Expand Up @@ -171,13 +168,13 @@ module.exports = {
return map;
},
experimental: {
async rewrites() {
return [
{ source: `/:lang(${LANGUAGES.join('|')})?/:rest`, destination: '/:rest' },
{ source: '/api/:rest*', destination: '/api-docs/:rest*' },
];
},
reactMode: reactMode.startsWith('legacy') ? 'legacy' : reactMode,
},
reactStrictMode: reactMode === 'legacy-strict',
async rewrites() {
return [
{ source: `/:lang(${LANGUAGES.join('|')})?/:rest*`, destination: '/:rest*' },
{ source: '/api/:rest*', destination: '/api-docs/:rest*' },
];
},
};
5 changes: 3 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Material-UI Team",
"license": "MIT",
"scripts": {
"build": "cross-env NODE_ENV=production next build",
"build": "cross-env NODE_ENV=production next build --profile",
"build:clean": "rimraf .next && yarn build",
"build-sw": "node ./scripts/buildServiceWorker.js",
"dev": "rimraf ./node_modules/.cache/babel-loader && next dev",
Expand Down Expand Up @@ -81,7 +81,7 @@
"marked": "^1.0.0",
"material-table": "^1.50.0",
"material-ui-popup-state": "^1.4.1",
"next": "^9.4.4",
"next": "^9.5.0",
"notistack": "^0.9.3",
"nprogress": "^0.2.0",
"postcss": "^7.0.18",
Expand Down Expand Up @@ -118,6 +118,7 @@
"@babel/preset-typescript": "^7.7.4",
"babel-plugin-unwrap-createstyles": "^4.1.0",
"cpy-cli": "^3.0.0",
"cross-fetch": "^3.0.5",
"gm": "^1.23.0"
}
}
3 changes: 2 additions & 1 deletion docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"skipLibCheck": false,
"esModuleInterop": true,
"types": ["react"]
}
},
"exclude": ["node_modules"]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"**/@babel/preset-typescript": "^7.10.4",
"**/@babel/runtime": "^7.10.2",
"**/@babel/types": "^7.10.2",
"**/cross-fetch": "^3.0.5",
"**/hoist-non-react-statics": "^3.3.2",
"**/terser": "^4.1.2"
},
Expand Down
8 changes: 4 additions & 4 deletions scripts/sizeSnapshot/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ async function getNextPagesSize() {
// used to be tracked with custom logic hence the different ids
if (pageUrl === '/') {
snapshotId = 'docs.landing';
} else if (pageUrl === 'static/pages/_app.js') {
snapshotId = 'docs.main';
// chunks contain a content hash that makes the names
// unsuitable for tracking. Using stable name instead:
} else if (/^runtime\/main\.(.+)\.js$/.test(pageUrl)) {
} else if (/^chunks\/pages\/_app\.(.+)\.js$/.test(pageUrl)) {
snapshotId = 'docs.main';
} else if (/^chunks\/main\.(.+)\.js$/.test(pageUrl)) {
snapshotId = 'docs:shared:runtime/main';
} else if (/^runtime\/webpack\.(.+)\.js$/.test(pageUrl)) {
} else if (/^chunks\/webpack\.(.+)\.js$/.test(pageUrl)) {
snapshotId = 'docs:shared:runtime/webpack';
} else if (/^chunks\/commons\.(.+)\.js$/.test(pageUrl)) {
snapshotId = 'docs:shared:chunk/commons';
Expand Down
Loading

0 comments on commit 83c0bee

Please sign in to comment.