Commit 049a8d2b authored by wildfirecode's avatar wildfirecode

1

parent 486eb7bb
......@@ -9,21 +9,12 @@ var serverStart = opts => {
let webpackConfig = devConfig(opts);
// 遍历每个entry,加入dev-server client
// Object.keys(webpackConfig.entry).forEach(function (name) {
// let _devServer = `webpack-dev-server/client?http://localhost:${
// opts.devPort
// }`;
// webpackConfig.entry[name] = [_devServer].concat(webpackConfig.entry[name]);
// });
// 遍历每个entry,加入dev-server client
Object.keys(webpackConfig.entry).forEach(function (name) {
let _devServer = `webpack-dev-server/client?http://localhost:${
opts.devPort
}`;
webpackConfig.entry = [_devServer].concat(webpackConfig.entry);
webpackConfig.entry[name] = [_devServer].concat(webpackConfig.entry[name]);
});
var compiler = webpack(webpackConfig);
......
......@@ -2,10 +2,12 @@ const path = require('path');
module.exports = opts => {
const result = {
entry: `./${opts.BUILD_SKIN}/src/Main.ts`,
// entry: {
// app: path.join(opts.BUILD_SKIN, '/src/Main.ts')
// },
entry: {
app: `./${opts.BUILD_SKIN}/src/Main.ts`
},
module: {
rules: [
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment