From bcf85607b75c141bf0d490ac6d9c2fd464f89e67 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sun, 16 Sep 2018 16:41:30 +0200 Subject: [PATCH] Implement hard-source-webpack-plugin --- build/webpack.js | 2 ++ package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/build/webpack.js b/build/webpack.js index a89a633d11b3d..613a40d479661 100644 --- a/build/webpack.js +++ b/build/webpack.js @@ -20,6 +20,7 @@ import { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin' 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' import AutoDllPlugin from 'autodll-webpack-plugin' import TerserPlugin from 'terser-webpack-plugin' +import HardSourceWebpackPlugin from 'hard-source-webpack-plugin' // The externals config makes sure that // on the server side when modules are @@ -235,6 +236,7 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i resolve: resolveConfig } }), + new HardSourceWebpackPlugin(), // This plugin makes sure `output.filename` is used for entry chunks new ChunkNamesPlugin(), !isServer && new ReactLoadablePlugin({ diff --git a/package.json b/package.json index 1be5ca7678a4b..73e0277edbddf 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "fresh": "0.5.2", "friendly-errors-webpack-plugin": "1.7.0", "glob": "7.1.2", + "hard-source-webpack-plugin": "0.12.0", "hoist-non-react-statics": "2.5.5", "htmlescape": "1.1.1", "http-errors": "1.6.2",