Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

Commit

Permalink
Improved support for server production builds
Browse files Browse the repository at this point in the history
  • Loading branch information
swernerx committed Jul 28, 2016
1 parent 6bc3d24 commit e9c252d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"json-loader": "^0.5.4",
"load-plugins": "^2.1.0",
"lost": "^7.0.3",
"node-noop": "^1.0.0",
"node-notifier": "^4.6.0",
"normalize.css": "^4.2.0",
"npm-install-webpack-plugin": "^4.0.4",
Expand Down
3 changes: 3 additions & 0 deletions webpackConfigFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ function webpackConfigFactory({ target, mode, root }, { json })
path: path.resolve(root, `./build/${target}`),
}),

// Effectively fake all "file-loader" files with placeholders on server side
ifServer(new webpack.NormalModuleReplacementPlugin(/\.(eot|woff|woff2|ttf|otf|svg|png|jpg|jpeg|gif|webp|mp4|mp3|ogg|pdf)$/, "node-noop")),

// We don't want webpack errors to occur during development as it will
// kill our dev servers.
ifDev(new webpack.NoErrorsPlugin()),
Expand Down

0 comments on commit e9c252d

Please sign in to comment.