-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove inline styles from _error.js and error-debug.js
- Loading branch information
Showing
8 changed files
with
111 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ import BuildManifestPlugin from './webpack/plugins/build-manifest-plugin' | |
import ChunkNamesPlugin from './webpack/plugins/chunk-names-plugin' | ||
import { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin' | ||
import {SERVER_DIRECTORY, REACT_LOADABLE_MANIFEST, CLIENT_STATIC_FILES_RUNTIME_WEBPACK, CLIENT_STATIC_FILES_RUNTIME_MAIN} from 'next-server/constants' | ||
import {NEXT_PROJECT_ROOT, NEXT_PROJECT_ROOT_NODE_MODULES, NEXT_PROJECT_ROOT_DIST_CLIENT, NEXT_PROJECT_ROOT_DIST_SERVER, DEFAULT_PAGES_DIR} from '../lib/constants' | ||
import {NEXT_PROJECT_ROOT, NEXT_PROJECT_ROOT_NODE_MODULES, NEXT_PROJECT_ROOT_DIST_CLIENT, NEXT_PROJECT_ROOT_DIST_SERVER, NEXT_PROJECT_ROOT_DIST_STATIC, DEFAULT_PAGES_DIR} from '../lib/constants' | ||
import TerserPlugin from 'terser-webpack-plugin' | ||
import AssetsSizePlugin from './webpack/plugins/assets-size-plugin' | ||
|
||
|
@@ -277,6 +277,19 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer | |
include: defaultLoaders.hotSelfAccept.options.include, | ||
use: defaultLoaders.hotSelfAccept | ||
}, | ||
// TODO: putting !isServer here causes problems? | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dav-is
Author
Contributor
|
||
{ | ||
include: [NEXT_PROJECT_ROOT_DIST_STATIC], | ||
use: [ | ||
{ | ||
loader: 'emit-file-loader', | ||
options: { | ||
name: `static/runtime/${dev ? '[name]-[hash].[ext]' : '[name]-[hash].[ext]'}`, | ||
importPath: true | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
test: /\.(js|jsx)$/, | ||
include: [dir, NEXT_PROJECT_ROOT_DIST_CLIENT, DEFAULT_PAGES_DIR, /next-server[\\/]dist[\\/]lib/], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.errorDebug { | ||
background: #ffffff; | ||
box-sizing: border-box; | ||
overflow: auto; | ||
padding: 24px; | ||
position: fixed; | ||
left: 0; | ||
right: 0; | ||
top: 0; | ||
bottom: 0; | ||
z-index: 9999; | ||
color: #000000; | ||
} | ||
|
||
.stack { | ||
font-family: "SF Mono", "Roboto Mono", "Fira Mono", consolas, menlo-regular, monospace; | ||
font-size: 13px; | ||
line-height: 18px; | ||
color: #777; | ||
margin: 0; | ||
white-space: pre-wrap; | ||
word-wrap: break-word; | ||
margin-top: 16px; | ||
} | ||
|
||
.heading { | ||
font-family: -apple-system, system-ui, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif; | ||
font-size: 20px; | ||
font-weight: 400; | ||
line-height: 28px; | ||
color: #000000; | ||
margin-bottom: 0px; | ||
margin-top: 0px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
body { | ||
margin: 0; | ||
} | ||
|
||
.error { | ||
color: #000; | ||
background: #fff; | ||
font-family: -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif; | ||
height: 100vh; | ||
text-align: center; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.desc { | ||
display: inline-block; | ||
text-align: left; | ||
line-height: 49px; | ||
height: 49px; | ||
vertical-align: middle; | ||
} | ||
|
||
h1 { | ||
display: inline-block; | ||
border-right: 1px solid rgba(0, 0, 0,.3); | ||
margin: 0; | ||
margin-right: 20px; | ||
padding: 10px 23px 10px 0; | ||
font-size: 24px; | ||
font-weight: 500; | ||
vertical-align: top; | ||
} | ||
|
||
h2 { | ||
font-size: 14px; | ||
font-weight: normal; | ||
line-height: inherit; | ||
margin: 0; | ||
padding: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You'd need something like null-loader or similar for handling the
.css
there.