diff --git a/packages/docusaurus/src/client/PendingNavigation.js b/packages/docusaurus/src/client/PendingNavigation.js index 3e7fd8634e62..c4e4327108f4 100644 --- a/packages/docusaurus/src/client/PendingNavigation.js +++ b/packages/docusaurus/src/client/PendingNavigation.js @@ -28,8 +28,6 @@ class PendingNavigation extends React.Component { const {routes, delay = 1000} = this.props; if (navigated) { - window.scrollTo(0, 0); - this.startProgressBar(delay); // save the location so we can render the old screen this.setState({ @@ -45,6 +43,7 @@ class PendingNavigation extends React.Component { }, this.stopProgressBar, ); + window.scrollTo(0, 0); }) .catch(e => console.warn(e)); } diff --git a/packages/docusaurus/src/webpack/base.js b/packages/docusaurus/src/webpack/base.js index 5f93ea994f9f..917281e20234 100644 --- a/packages/docusaurus/src/webpack/base.js +++ b/packages/docusaurus/src/webpack/base.js @@ -100,13 +100,10 @@ module.exports = function createBaseConfig(props, isServer) { { test: /\.jsx?$/, exclude(modulePath) { - // always transpile our own library - if (modulePath.startsWith(path.join(__dirname, '..'))) { - return false; - } - - // Don't transpile node_modules - return /node_modules/.test(modulePath); + // Don't transpile node_modules except any docusaurus package + return ( + /node_modules/.test(modulePath) && !/docusaurus/.test(modulePath) + ); }, use: [ cacheLoader && getCacheLoader(isServer), diff --git a/website-1.x/blog/2018-09-11-Towards-Docusaurus-2.md b/website-1.x/blog/2018-09-11-Towards-Docusaurus-2.md index d57d0ca7ed76..ac74ea3f40f0 100644 --- a/website-1.x/blog/2018-09-11-Towards-Docusaurus-2.md +++ b/website-1.x/blog/2018-09-11-Towards-Docusaurus-2.md @@ -17,7 +17,7 @@ There is a saying that the very best software is constantly evolving, and the ve It all started with this [RFC issue](https://github.com/facebook/Docusaurus/issues/789) opened by [Yangshun](https://github.com/yangshun) towards the end of June 2018. -

[RFC] Docusaurus v2 · Issue #789 · facebook/Docusaurus

These are some of the problems I'm seeing in Docusaurus now and also how we can address them in v2. A number of the ideas here were inspired by VuePress and other static site generators. In the current static site generators ecosystem, t...

+

[RFC] Docusaurus v2 · Issue #789 · facebook/Docusaurus

These are some of the problems I'm seeing in Docusaurus now and also how we can address them in v2. A number of the ideas here were inspired by VuePress and other static site generators. In the current static site generators ecosystem, t...

Most of the suggested improvements are mentioned in the issue; I will provide details on some of issues in Docusaurus 1 and how we are going to address them in Docusaurus 2. @@ -132,4 +132,3 @@ If you are using Docusaurus, you are part of our community; keep letting us know Lastly, if you haven't done so already, click the **star** and **watch** button on [GitHub](https://github.com/facebook/Docusaurus), and follow us on [Twitter](https://twitter.com/docusaurus). -