Skip to content

Commit c8f93d5

Browse files
authored
fix: normalize file path in HTML template generation (#7795)
1 parent 8444aeb commit c8f93d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/solutions/app-tools/src/plugins/analyze/getHtmlTemplate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const getHtmlTemplate = async (
109109
PartialPosition.INDEX,
110110
);
111111
if (customIndexTemplate) {
112-
htmlTemplates[entryName] = customIndexTemplate.file;
112+
htmlTemplates[entryName] = customIndexTemplate.file.replace(/\\/g, '/');
113113
} else {
114114
const getPartialInitValue = (position: PartialPosition) => {
115115
const partial = findPartials(htmlDir, name, position);
@@ -134,7 +134,7 @@ export const getHtmlTemplate = async (
134134

135135
fs.outputFileSync(templatePath, templates.html(partials), 'utf8');
136136

137-
htmlTemplates[entryName] = templatePath;
137+
htmlTemplates[entryName] = templatePath.replace(/\\/g, '/');
138138
partialsByEntrypoint[entryName] = partials;
139139

140140
const bottomTemplate = findPartials(

0 commit comments

Comments
 (0)