修复初始化报错
This commit is contained in:
1 parent
18388346d5
commit
7e7e2cb2f5
2 files changed
+4
-4
No files matched your search
+3
-3
@@ -2,8 +2,8 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const chalk = require('chalk');
|
||||
const webpack = require('webpack');
|
||||
const webpackDevServer = require('webpack-dev-server');
|
||||
//const webpack = require('webpack');
|
||||
//const webpackDevServer = require('webpack-dev-server');
|
||||
const util = require('./util');
|
||||
const webpackConfig = require('./webpack.react');
|
||||
|
||||
@@ -27,7 +27,7 @@ exports.init = (type, paths, command) => {
|
||||
_configJson = util.configJson(_paths.targetPath);
|
||||
|
||||
if(_configJson.template == 'react') {
|
||||
webpackConfig.run(command);
|
||||
webpackConfig.run(paths, command);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
|
||||
@@ -38,7 +38,7 @@ let _webpackConfig = {
|
||||
};
|
||||
|
||||
exports.run = (paths, command) => {
|
||||
|
||||
console.log(paths);
|
||||
//入口文件
|
||||
_webpackConfig.entry = path.join(paths.targetPath, 'src', 'index.js');
|
||||
|
||||
|
||||
Reference in new issue
Block a user