Skip to content

Commit 302f9c1

Browse files
committed
修改默认 webpack 入口
1 parent f4caa05 commit 302f9c1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ module.exports = (api, option, rootOptions) => {
1414
]
1515
}
1616
});
17-
17+
// 渲染模板
1818
api.render('./template');
1919
};

index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
module.exports = (api, projectOptions) => {};
1+
module.exports = (api, projectOptions) => {
2+
api.chainWebpack(webpackConfig => {
3+
webpackConfig
4+
.entry('app')
5+
.delete('./src/main.js')
6+
.add('./src/index.js')
7+
.end();
8+
});
9+
};

0 commit comments

Comments
 (0)