mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-29 14:38:50 +02:00
fix(v2): fix cannot import css from node_modules in userland (#1463)
This commit is contained in:
parent
e873c14918
commit
5685e8ab38
5 changed files with 2 additions and 86 deletions
|
@ -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",
|
||||
|
|
|
@ -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});
|
||||
|
||||
|
|
|
@ -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); }
|
||||
}
|
|
@ -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({
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue