diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 56b1c97e7bd7..80eb736909ce 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -72,8 +72,7 @@ "webpack-bundle-analyzer": "^3.1.0", "webpack-dev-server": "^3.2.1", "webpack-merge": "^4.1.4", - "webpack-nicelog": "^2.3.1", - "webpack-node-externals": "^1.7.2" + "webpack-nicelog": "^2.3.1" }, "peerDependencies": { "react": "^16.8.4", diff --git a/packages/docusaurus/src/client/PendingNavigation.js b/packages/docusaurus/src/client/PendingNavigation.js index c4e4327108f4..b9c9ce3b51ee 100644 --- a/packages/docusaurus/src/client/PendingNavigation.js +++ b/packages/docusaurus/src/client/PendingNavigation.js @@ -9,7 +9,7 @@ import React from 'react'; import {Route, withRouter} from 'react-router-dom'; import nprogress from 'nprogress'; import preload from './preload'; -import './nprogress.css'; +import 'nprogress/nprogress.css'; nprogress.configure({showSpinner: false}); diff --git a/packages/docusaurus/src/client/nprogress.css b/packages/docusaurus/src/client/nprogress.css deleted file mode 100644 index ca5b040bafad..000000000000 --- a/packages/docusaurus/src/client/nprogress.css +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/* Make clicks pass-through */ -#nprogress { - pointer-events: none; -} - -#nprogress .bar { - background: #29d; - position: fixed; - z-index: 1031; - top: 0; - left: 0; - width: 100%; - height: 2px; -} - -/* Fancy blur effect */ -#nprogress .peg { - display: block; - position: absolute; - right: 0px; - width: 100px; - height: 100%; - box-shadow: 0 0 10px #29d, 0 0 5px #29d; - opacity: 1.0; - -webkit-transform: rotate(3deg) translate(0px, -4px); - -ms-transform: rotate(3deg) translate(0px, -4px); - transform: rotate(3deg) translate(0px, -4px); -} - -/* Remove these to get rid of the spinner */ -#nprogress .spinner { - display: block; - position: fixed; - z-index: 1031; - top: 15px; - right: 15px; -} - -#nprogress .spinner-icon { - width: 18px; - height: 18px; - box-sizing: border-box; - border: solid 2px transparent; - border-top-color: #29d; - border-left-color: #29d; - border-radius: 50%; - -webkit-animation: nprogress-spinner 400ms linear infinite; - animation: nprogress-spinner 400ms linear infinite; -} - -.nprogress-custom-parent { - overflow: hidden; - position: relative; -} - -.nprogress-custom-parent #nprogress .spinner, -.nprogress-custom-parent #nprogress .bar { - position: absolute; -} - -@-webkit-keyframes nprogress-spinner { - 0% { -webkit-transform: rotate(0deg); } - 100% { -webkit-transform: rotate(360deg); } -} -@keyframes nprogress-spinner { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } -} diff --git a/packages/docusaurus/src/webpack/server.js b/packages/docusaurus/src/webpack/server.js index 814f670af092..1a8211a1b080 100644 --- a/packages/docusaurus/src/webpack/server.js +++ b/packages/docusaurus/src/webpack/server.js @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -const nodeExternals = require('webpack-node-externals'); const path = require('path'); const StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin'); const WebpackNiceLog = require('webpack-nicelog'); @@ -37,8 +36,6 @@ module.exports = function createServerConfig(props) { globalObject: 'this', }, target: 'node', - // No need to bundle its node_modules dependencies since we're bundling for static html generation (backend) - externals: [nodeExternals()], plugins: [ // Wait until manifest from client bundle is generated new WaitPlugin({ diff --git a/yarn.lock b/yarn.lock index a4583dec120c..58ef816d2bfe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13946,11 +13946,6 @@ webpack-nicelog@^2.3.1: react-dev-utils "^5.0.1" webpackbar "^2.6.1" -webpack-node-externals@^1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.7.2.tgz#6e1ee79ac67c070402ba700ef033a9b8d52ac4e3" - integrity sha512-ajerHZ+BJKeCLviLUUmnyd5B4RavLF76uv3cs6KNuO8W+HuQaEs0y0L7o40NQxdPy5w0pcv8Ew7yPUAQG0UdCg== - webpack-sources@^0.2.0: version "0.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.2.3.tgz#17c62bfaf13c707f9d02c479e0dcdde8380697fb"