Skip to content

Commit c97e338

Browse files
committed
Change packaging of external dependencies
1 parent 0c1b2ef commit c97e338

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

config/webpack.ssr.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const webpack = require('webpack');
44
const HtmlWebpackPlugin = require('html-webpack-plugin');
55
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
6+
const nodeExternals = require('webpack-node-externals');
67
const webpackConfigFactory = require('./webpack.config.js');
78
const paths = require('./paths');
89
const getClientEnvironment = require('./env');
@@ -43,7 +44,8 @@ module.exports = function (webpackEnv) {
4344
// avoid shadowing of process.env for ssr handler
4445
webpack.DefinePlugin
4546
].every(pluginClass => !(plugin instanceof pluginClass))
46-
)
47+
),
48+
externals: [nodeExternals()]
4749
},
4850
// client compiler config
4951
{

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"webpack": "4.19.1",
8282
"webpack-dev-server": "3.1.14",
8383
"webpack-manifest-plugin": "2.0.4",
84+
"webpack-node-externals": "^1.7.2",
8485
"workbox-webpack-plugin": "3.6.3"
8586
},
8687
"devDependencies": {

0 commit comments

Comments
 (0)