Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#fix starting server code after compile assets (sync) #575

Merged
merged 1 commit into from
Apr 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions packages/razzle/scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,19 @@ function main() {

// Compile our assets with webpack
const clientCompiler = compile(clientConfig);

const serverCompiler = compile(serverConfig);

// Start our server webpack instance in watch mode.
serverCompiler.watch(
{
quiet: true,
stats: 'none',
},
/* eslint-disable no-unused-vars */
stats => {}
);
// Start our server webpack instance in watch mode after assets compile
clientCompiler.plugin('done', () => {
serverCompiler.watch(
{
quiet: true,
stats: 'none',
},
/* eslint-disable no-unused-vars */
stats => {}
);
});

// Create a new instance of Webpack-dev-server for our client assets.
// This will actually run on a different port than the users app.
Expand Down