Skip to content

Commit

Permalink
Merge pull request #231 from developit/fix/wait-for-ssr-bundle
Browse files Browse the repository at this point in the history
fix: Cannot find module /ssr-bundle.js
  • Loading branch information
reznord authored Jul 16, 2017
2 parents dcde1e2 + a3aa7f3 commit 0bdc95c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"get-port": "^3.1.0",
"html-webpack-exclude-assets-plugin": "0.0.5",
"html-webpack-plugin": "^2.28.0",
"html-webpack-wait-for-assets-plugin": "^1.0.0",
"inquirer": "^3.2.0",
"ip": "^1.1.5",
"isomorphic-unfetch": "^2.0.0",
Expand Down
4 changes: 4 additions & 0 deletions src/lib/webpack/webpack-client-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import devServer from '@webpack-blocks/dev-server2';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import HtmlWebpackExcludeAssetsPlugin from 'html-webpack-exclude-assets-plugin';
import HtmlWebpackWaitForAssetsPlugin from 'html-webpack-wait-for-assets-plugin';
import ScriptExtHtmlWebpackPlugin from 'script-ext-html-webpack-plugin';
import CopyWebpackPlugin from 'copy-webpack-plugin';
import SWPrecacheWebpackPlugin from 'sw-precache-webpack-plugin';
Expand Down Expand Up @@ -232,6 +233,9 @@ const htmlPlugin = (config, src) => {
new ScriptExtHtmlWebpackPlugin({
// inline: 'bundle.js',
defaultAttribute: 'defer'
}),
new HtmlWebpackWaitForAssetsPlugin({
assets: [resolve(config.dest, './ssr-build/ssr-bundle.js')]
})
]));
};

0 comments on commit 0bdc95c

Please sign in to comment.