Commit 77a138cc authored by Tim Neutkens's avatar Tim Neutkens

Remove devFiles

parent 6dd910d0
...@@ -117,7 +117,6 @@ async function doRender (req, res, pathname, query, { ...@@ -117,7 +117,6 @@ async function doRender (req, res, pathname, query, {
const ctx = { err, req, res, pathname, query, asPath } const ctx = { err, req, res, pathname, query, asPath }
const router = new Router(pathname, query, asPath) const router = new Router(pathname, query, asPath)
const props = await loadGetInitialProps(App, {Component, router, ctx}) const props = await loadGetInitialProps(App, {Component, router, ctx})
const devFiles = buildManifest.devFiles
const files = [ const files = [
...new Set([ ...new Set([
...getPageFiles(buildManifest, normalizedPagePath), ...getPageFiles(buildManifest, normalizedPagePath),
...@@ -200,7 +199,6 @@ async function doRender (req, res, pathname, query, { ...@@ -200,7 +199,6 @@ async function doRender (req, res, pathname, query, {
dir, dir,
staticMarkup, staticMarkup,
buildManifest, buildManifest,
devFiles,
files, files,
dynamicImports, dynamicImports,
assetPrefix, // We always pass assetPrefix as a top level property since _document needs it to render, even though the client side might not need it assetPrefix, // We always pass assetPrefix as a top level property since _document needs it to render, even though the client side might not need it
......
...@@ -19,7 +19,6 @@ import ChunkNamesPlugin from './webpack/plugins/chunk-names-plugin' ...@@ -19,7 +19,6 @@ import ChunkNamesPlugin from './webpack/plugins/chunk-names-plugin'
import { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin' import { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin'
import {SERVER_DIRECTORY, CLIENT_STATIC_FILES_RUNTIME_WEBPACK, CLIENT_STATIC_FILES_RUNTIME_MAIN} from 'next-server/constants' import {SERVER_DIRECTORY, 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, DEFAULT_PAGES_DIR} from '../lib/constants' import {NEXT_PROJECT_ROOT, NEXT_PROJECT_ROOT_NODE_MODULES, NEXT_PROJECT_ROOT_DIST, DEFAULT_PAGES_DIR} from '../lib/constants'
import AutoDllPlugin from 'autodll-webpack-plugin'
import TerserPlugin from 'terser-webpack-plugin' import TerserPlugin from 'terser-webpack-plugin'
// The externals config makes sure that // The externals config makes sure that
...@@ -233,22 +232,6 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i ...@@ -233,22 +232,6 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i
].filter(Boolean) ].filter(Boolean)
}, },
plugins: [ plugins: [
// Precompile react / react-dom for development, speeding up webpack
dev && !isServer && new AutoDllPlugin({
filename: '[name]_[hash].js',
path: './static/development/dll',
context: dir,
entry: {
dll: [
'react',
'react-dom'
]
},
config: {
mode: webpackMode,
resolve: resolveConfig
}
}),
// This plugin makes sure `output.filename` is used for entry chunks // This plugin makes sure `output.filename` is used for entry chunks
new ChunkNamesPlugin(), new ChunkNamesPlugin(),
!isServer && new ReactLoadablePlugin(), !isServer && new ReactLoadablePlugin(),
......
...@@ -191,12 +191,11 @@ export class NextScript extends Component { ...@@ -191,12 +191,11 @@ export class NextScript extends Component {
} }
render () { render () {
const { staticMarkup, assetPrefix, devFiles, __NEXT_DATA__ } = this.context._documentProps const { staticMarkup, assetPrefix, __NEXT_DATA__ } = this.context._documentProps
const { page, pathname, buildId } = __NEXT_DATA__ const { page, pathname, buildId } = __NEXT_DATA__
const pagePathname = getPagePathname(pathname) const pagePathname = getPagePathname(pathname)
return <Fragment> return <Fragment>
{devFiles ? devFiles.map((file) => <script key={file} src={`${assetPrefix}/_next/${file}`} nonce={this.props.nonce} />) : null}
{staticMarkup ? null : <script nonce={this.props.nonce} dangerouslySetInnerHTML={{ {staticMarkup ? null : <script nonce={this.props.nonce} dangerouslySetInnerHTML={{
__html: NextScript.getInlineScriptSource(this.context._documentProps) __html: NextScript.getInlineScriptSource(this.context._documentProps)
}} />} }} />}
......
...@@ -187,10 +187,6 @@ export default function ({ app }, suiteName, render, fetch, appPort) { ...@@ -187,10 +187,6 @@ export default function ({ app }, suiteName, render, fetch, appPort) {
resources.push('/_next/' + item) resources.push('/_next/' + item)
} }
for (const item of buildManifest.devFiles) {
resources.push('/_next/' + item)
}
const responses = await Promise.all(resources.map((resource) => fetch(resource))) const responses = await Promise.all(resources.map((resource) => fetch(resource)))
responses.forEach((res) => { responses.forEach((res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment