diff --git a/packages/backend/server/src/core/doc-renderer/controller.ts b/packages/backend/server/src/core/doc-renderer/controller.ts
index 9d69ae14ba..fff14f545a 100644
--- a/packages/backend/server/src/core/doc-renderer/controller.ts
+++ b/packages/backend/server/src/core/doc-renderer/controller.ts
@@ -154,40 +154,49 @@ export class DocRendererController {
const summary = opts ? htmlSanitize(opts.summary) : assets.description;
const image = opts?.avatar ?? 'https://affine.pro/og.jpeg';
- return `
-
-
-
-
-
- ${title}
-
-
-
-
-
-
- ${!opts ? '' : ''}
-
-
-
-
-
-
-
- ${assets.css.map(url => ``).join('\n')}
-
-
-
- ${assets.js.map(url => ``).join('\n')}
-
-
+ // TODO(@forehalo): parse assets/index.html
+ return `
+
+
+
+
+
+
+
+
+
+ ${title}
+
+
+
+
+
+
+
+ ${!opts ? '' : ''}
+
+
+
+
+
+
+
+ ${assets.css.map(url => ``).join('\n')}
+
+
+
+ ${assets.js.map(url => ``).join('\n')}
+
+
`;
}
}
diff --git a/tools/cli/src/webpack/template.html b/tools/cli/src/webpack/template.html
index 3a80c2874e..792ff67b9c 100644
--- a/tools/cli/src/webpack/template.html
+++ b/tools/cli/src/webpack/template.html
@@ -20,6 +20,7 @@
+
@@ -39,7 +40,6 @@
-
diff --git a/tools/cli/src/webpack/webpack.config.ts b/tools/cli/src/webpack/webpack.config.ts
index 01d7f0d1e4..018f5edba0 100644
--- a/tools/cli/src/webpack/webpack.config.ts
+++ b/tools/cli/src/webpack/webpack.config.ts
@@ -45,7 +45,6 @@ export function createWebpackConfig(cwd: string, flags: BuildFlags) {
return new HTMLPlugin({
template: join(rootPath, 'webpack', 'template.html'),
inject: 'body',
- scriptLoading: 'module',
minify: false,
chunks: [entryName],
filename: `${entryName === 'app' ? 'index' : entryName}.html`, // main entry should take name index.html