Skip to content

Commit

Permalink
Make sure module can be required in Node.js without throwing an error…
Browse files Browse the repository at this point in the history
… (needed for universal / SSR builds)
  • Loading branch information
friday committed Jul 19, 2018
1 parent 82672f7 commit 6300f72
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions webpack.config.js
Expand Up @@ -74,6 +74,7 @@ function getPluginsForConfig(type, minify = false) {
);

const plugins = [
new webpack.BannerPlugin({ entryOnly: true, raw: true, banner: 'typeof window !== "undefined" &&' }), // SSR/Node.js guard
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin(defineConstants)
];
Expand Down

0 comments on commit 6300f72

Please sign in to comment.