Skip to content

Commit fdd79a5

Browse files
author
chengyu.chengyulia
committed
feat: support disable html-webpack-plugin
1 parent ee54ebc commit fdd79a5

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

src/built-in-plugins/command-dev/plugin/project-dev.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,12 @@ async function debugProject(options?: any) {
155155
},
156156
outFileName: '[name].js',
157157
devServerPort: freePort,
158-
htmlTemplatePath: path.join(__dirname, '../../../../template-project.ejs'),
159-
htmlTemplateArgs: {
160-
dashboardServerPort,
161-
},
158+
...(pri.sourceConfig.useHtmlTemplate && {
159+
htmlTemplatePath: path.join(__dirname, '../../../../template-project.ejs'),
160+
htmlTemplateArgs: {
161+
dashboardServerPort,
162+
},
163+
}),
162164
pipeConfig,
163165
});
164166
}

src/utils/define.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ export class ProjectConfig {
285285
*/
286286
public projectRootId = 'root';
287287

288+
/**
289+
* Use default html template
290+
*/
291+
public useHtmlTemplate = true;
292+
288293
/**
289294
* Enable ensure files
290295
*/

0 commit comments

Comments
 (0)