Commit 049a8d2b authored by wildfirecode's avatar wildfirecode

1

parent 486eb7bb
...@@ -9,21 +9,12 @@ var serverStart = opts => { ...@@ -9,21 +9,12 @@ var serverStart = opts => {
let webpackConfig = devConfig(opts); let webpackConfig = devConfig(opts);
// 遍历每个entry,加入dev-server client // 遍历每个entry,加入dev-server client
// Object.keys(webpackConfig.entry).forEach(function (name) { Object.keys(webpackConfig.entry).forEach(function (name) {
// let _devServer = `webpack-dev-server/client?http://localhost:${ let _devServer = `webpack-dev-server/client?http://localhost:${
// opts.devPort opts.devPort
// }`; }`;
// webpackConfig.entry[name] = [_devServer].concat(webpackConfig.entry[name]); webpackConfig.entry[name] = [_devServer].concat(webpackConfig.entry[name]);
// }); });
// 遍历每个entry,加入dev-server client
let _devServer = `webpack-dev-server/client?http://localhost:${
opts.devPort
}`;
webpackConfig.entry = [_devServer].concat(webpackConfig.entry);
var compiler = webpack(webpackConfig); var compiler = webpack(webpackConfig);
......
...@@ -2,10 +2,12 @@ const path = require('path'); ...@@ -2,10 +2,12 @@ const path = require('path');
module.exports = opts => { module.exports = opts => {
const result = { const result = {
entry: `./${opts.BUILD_SKIN}/src/Main.ts`,
// entry: { // entry: {
// app: path.join(opts.BUILD_SKIN, '/src/Main.ts') // app: path.join(opts.BUILD_SKIN, '/src/Main.ts')
// }, // },
entry: {
app: `./${opts.BUILD_SKIN}/src/Main.ts`
},
module: { module: {
rules: [ 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