@linglongos/vite-plugin-html 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +19 -17
  2. package/README.zh_CN.md +18 -16
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @linglongos/vite-plugin-html
2
2
 
3
+ [**English**](./README.md) | [**中文**](./README.zh_CN.md)
4
+
3
5
  Forked from [vite-plugin-html](https://www.npmjs.com/package/vite-plugin-html) with **Vite 6/7/8 support** and modernized dependencies.
4
6
 
5
7
  ## Features
@@ -110,30 +112,30 @@ export default defineConfig({
110
112
 
111
113
  ### UserOptions
112
114
 
113
- | Parameter | Type | Default | Description |
114
- | ----------- | ------------------------ | ------------- | ------------------------------ |
115
- | entry | `string` | `src/main.ts` | Entry file path |
116
- | template | `string` | `index.html` | Relative path to the template |
117
- | inject | `InjectOptions` | - | Data injected into HTML |
118
- | minify | `boolean \| MinifyOptions` | - | Whether to compress html |
119
- | pages | `PageOption` | - | Multi-page configuration |
115
+ | Parameter | Type | Default | Description |
116
+ | --------- | -------------------------- | ------------- | ----------------------------- |
117
+ | entry | `string` | `src/main.ts` | Entry file path |
118
+ | template | `string` | `index.html` | Relative path to the template |
119
+ | inject | `InjectOptions` | - | Data injected into HTML |
120
+ | minify | `boolean \| MinifyOptions` | - | Whether to compress html |
121
+ | pages | `PageOption` | - | Multi-page configuration |
120
122
 
121
123
  ### InjectOptions
122
124
 
123
- | Parameter | Type | Default | Description |
124
- | ---------- | ---------------------- | ------- | ---------------------------------------------- |
125
- | data | `Record<string, any>` | - | Injected data (accessible via EJS syntax) |
126
- | ejsOptions | `EJSOptions` | - | EJS configuration |
127
- | tags | `HtmlTagDescriptor` | - | List of tags to inject |
125
+ | Parameter | Type | Default | Description |
126
+ | ---------- | --------------------- | ------- | ----------------------------------------- |
127
+ | data | `Record<string, any>` | - | Injected data (accessible via EJS syntax) |
128
+ | ejsOptions | `EJSOptions` | - | EJS configuration |
129
+ | tags | `HtmlTagDescriptor` | - | List of tags to inject |
128
130
 
129
131
  ### PageOption
130
132
 
131
- | Parameter | Type | Default | Description |
133
+ | Parameter | Type | Default | Description |
132
134
  | ------------- | --------------- | ------------- | ----------------------------- |
133
- | filename | `string` | - | HTML file name |
134
- | template | `string` | `index.html` | Relative path to the template |
135
- | entry | `string` | `src/main.ts` | Entry file path |
136
- | injectOptions | `InjectOptions`| - | Data injected into HTML |
135
+ | filename | `string` | - | HTML file name |
136
+ | template | `string` | `index.html` | Relative path to the template |
137
+ | entry | `string` | `src/main.ts` | Entry file path |
138
+ | injectOptions | `InjectOptions` | - | Data injected into HTML |
137
139
 
138
140
  ## Environment Variables
139
141
 
package/README.zh_CN.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @linglongos/vite-plugin-html
2
2
 
3
+ [**English**](./README.md) | [**中文**](./README.zh_CN.md)
4
+
3
5
  基于 [vite-plugin-html](https://www.npmjs.com/package/vite-plugin-html) fork,**支持 Vite 6/7/8**,持续更新维护。
4
6
 
5
7
  ## 功能特性
@@ -110,30 +112,30 @@ export default defineConfig({
110
112
 
111
113
  ### UserOptions
112
114
 
113
- | 参数 | 类型 | 默认值 | 说明 |
114
- | -------- | ------------------------ | ------------- | ------------------ |
115
- | entry | `string` | `src/main.ts` | 入口文件路径 |
116
- | template | `string` | `index.html` | 模板相对路径 |
117
- | inject | `InjectOptions` | - | 注入 HTML 的数据 |
118
- | minify | `boolean \| MinifyOptions` | - | 是否压缩 html |
119
- | pages | `PageOption` | - | 多页配置 |
115
+ | 参数 | 类型 | 默认值 | 说明 |
116
+ | -------- | -------------------------- | ------------- | ---------------- |
117
+ | entry | `string` | `src/main.ts` | 入口文件路径 |
118
+ | template | `string` | `index.html` | 模板相对路径 |
119
+ | inject | `InjectOptions` | - | 注入 HTML 的数据 |
120
+ | minify | `boolean \| MinifyOptions` | - | 是否压缩 html |
121
+ | pages | `PageOption` | - | 多页配置 |
120
122
 
121
123
  ### InjectOptions
122
124
 
123
- | 参数 | 类型 | 默认值 | 说明 |
124
- | ---------- | --------------------- | ------ | -------------------------- |
125
+ | 参数 | 类型 | 默认值 | 说明 |
126
+ | ---------- | --------------------- | ------ | ------------------------------ |
125
127
  | data | `Record<string, any>` | - | 注入的数据 (可用 EJS 语法访问) |
126
- | ejsOptions | `EJSOptions` | - | EJS 配置项 |
127
- | tags | `HtmlTagDescriptor` | - | 需要注入的标签列表 |
128
+ | ejsOptions | `EJSOptions` | - | EJS 配置项 |
129
+ | tags | `HtmlTagDescriptor` | - | 需要注入的标签列表 |
128
130
 
129
131
  ### PageOption
130
132
 
131
- | 参数 | 类型 | 默认值 | 说明 |
133
+ | 参数 | 类型 | 默认值 | 说明 |
132
134
  | ------------- | --------------- | ------------- | ---------------- |
133
- | filename | `string` | - | HTML 文件名 |
134
- | template | `string` | `index.html` | 模板相对路径 |
135
- | entry | `string` | `src/main.ts` | 入口文件路径 |
136
- | injectOptions | `InjectOptions`| - | 注入 HTML 的数据 |
135
+ | filename | `string` | - | HTML 文件名 |
136
+ | template | `string` | `index.html` | 模板相对路径 |
137
+ | entry | `string` | `src/main.ts` | 入口文件路径 |
138
+ | injectOptions | `InjectOptions` | - | 注入 HTML 的数据 |
137
139
 
138
140
  ## 环境变量注入
139
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linglongos/vite-plugin-html",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Fork of vite-plugin-html with Vite 8 support, EJS template and HTML minification for index.html",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -41,13 +41,13 @@
41
41
  },
42
42
  "repository": {
43
43
  "type": "git",
44
- "url": "https://github.com/vbenjs/vite-plugin-html",
44
+ "url": "https://github.com/chudongsong/vite-plugin-html2",
45
45
  "directory": "packages/core"
46
46
  },
47
47
  "bugs": {
48
- "url": "https://github.com/vbenjs/vite-plugin-html/issues"
48
+ "url": "https://github.com/chudongsong/vite-plugin-html2/issues"
49
49
  },
50
- "homepage": "https://github.com/vbenjs/vite-plugin-html/tree/master/#readme",
50
+ "homepage": "https://github.com/chudongsong/vite-plugin-html2#readme",
51
51
  "dependencies": {
52
52
  "@rollup/pluginutils": "^4.2.0",
53
53
  "colorette": "^2.0.16",