Skip to content

Commit b475e61

Browse files
authoredSep 16, 2018
Implement hard-source-webpack-plugin (#5181)
Follow-up of #5176 Closes #5173 as it led to inconsistencies in DX.
1 parent 459c1c1 commit b475e61

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
 

‎build/webpack.js

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin'
2020
import {SERVER_DIRECTORY, NEXT_PROJECT_ROOT, NEXT_PROJECT_ROOT_NODE_MODULES, NEXT_PROJECT_ROOT_DIST, DEFAULT_PAGES_DIR, REACT_LOADABLE_MANIFEST, CLIENT_STATIC_FILES_RUNTIME_WEBPACK, CLIENT_STATIC_FILES_RUNTIME_MAIN} from '../lib/constants'
2121
import AutoDllPlugin from 'autodll-webpack-plugin'
2222
import TerserPlugin from 'terser-webpack-plugin'
23+
import HardSourceWebpackPlugin from 'hard-source-webpack-plugin'
2324

2425
// The externals config makes sure that
2526
// on the server side when modules are
@@ -235,6 +236,7 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i
235236
resolve: resolveConfig
236237
}
237238
}),
239+
new HardSourceWebpackPlugin(),
238240
// This plugin makes sure `output.filename` is used for entry chunks
239241
new ChunkNamesPlugin(),
240242
!isServer && new ReactLoadablePlugin({

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"fresh": "0.5.2",
8787
"friendly-errors-webpack-plugin": "1.7.0",
8888
"glob": "7.1.2",
89+
"hard-source-webpack-plugin": "0.12.0",
8990
"hoist-non-react-statics": "2.5.5",
9091
"htmlescape": "1.1.1",
9192
"http-errors": "1.6.2",

0 commit comments

Comments
 (0)
Please sign in to comment.