0.0.6 • Published 1 year ago

@ttou/vite-html v0.0.6

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Html

ViteJS index.html 渲染处理插件

安装

npm i @ttou/vite-html

配置

index.html

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vue.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <!-- 标题 -->
    <%- injectTitle %>
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>

vite.config.ts

import { customHtml } from '@ttou/vite-html'
import { defineConfig } from 'vite'

export default defineConfig(() => {
  return {
    plugins: [
      vue(),
      customHtml({
        injectTitle: `<title>Playground</title>`
      })
    ]
  }
})
0.0.6

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago