Skip to content

Commit

Permalink
docs: ✏️ upgrade vite-plugin-index-html usage (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
maoxiaoke authored Dec 7, 2021
1 parent 479b7c2 commit 73d8aa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/docs/guide/use-child/others.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,12 @@ import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
+ import htmlPlugin from 'vite-plugin-index-html';


export default defineConfig({
plugins: [
vue(),
+ htmlPlugin({
+ input: './src/main.ts'
+ input: './src/main.ts', // 指定确定的入口文件
+ preserveEntrySignatures: "exports-only", // 确保入口文件导出生命周期函数
+ })
],

Expand Down

0 comments on commit 73d8aa3

Please sign in to comment.