Skip to content

Conversation

@daming-lu
Copy link
Collaborator

Note the demo server target shares a large amount of common code with dev server in these files:

webpack.demo.config.js
demo-server.js
start_demo_server.sh

After I gain more experiences in webpack and npm, I will try to merge the common part.

Tracking it here

daming-lu added 28 commits April 2, 2018 09:41

// add hot-reload related code to entry chunks
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
baseWebpackConfig.entry[name] = ['./tool/dev-client'].concat(baseWebpackConfig.entry[name]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need to update the name from ./tool/dev-client to ./tool/demo-client

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only have dev-client.js which just includes hot-reload code.

});

/**
* dev config
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

demo config

_resolve = resolve;
});

console.log('> Starting dev server...');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

starting demo server.

let express = require('express');
let webpack = require('webpack');
let proxyMiddleware = require('http-proxy-middleware');
let webpackConfig = require('./webpack.dev.config');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is loading the incorrect config. Should update ./webpack.dev.config to ./webpack.demo.config

@daming-lu daming-lu merged commit 9b96642 into PaddlePaddle:develop Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants