Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb752661

Browse files
authored
Merge pull request#13 from gkiely/main
Update index.ts for vite@5
2 parents3b03907 +163cd54 commitb752661

File tree

4 files changed

+259
-216
lines changed

4 files changed

+259
-216
lines changed

‎index.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import{Plugin,ResolvedConfig,UserConfig}from"vite";
1+
import{Plugin,ResolvedConfig}from"vite";
22
importejsfrom"ejs";
33

44
// ShortHand for EjsOptions or Undefined
@@ -30,8 +30,8 @@ function ViteEjsPlugin(data: ViteEjsPluginDataType = {}, options?: ViteEjsPlugin
3030
},
3131

3232
transformIndexHtml:{
33-
enforce:"pre",
34-
transform(html){
33+
order:"pre",
34+
handler(html){
3535
if(typeofdata==="function")data=data(config);
3636
letejsOptions=options&&options.ejs ?options.ejs :{};
3737
if(typeofejsOptions==="function")ejsOptions=ejsOptions(config);
@@ -59,4 +59,4 @@ function ViteEjsPlugin(data: ViteEjsPluginDataType = {}, options?: ViteEjsPlugin
5959
}
6060

6161

62-
export{ViteEjsPlugin,ejs}
62+
export{ViteEjsPlugin,ejs}

‎package.json‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"vite-plugin-ejs",
3-
"version":"1.6.4",
3+
"version":"1.7.0",
44
"description":"Use Ejs in your entrypoint i.e index.html",
55
"main":"index.js",
66
"types":"index.d.ts",
@@ -14,12 +14,15 @@
1414
"prepublishOnly":"npm run build"
1515
},
1616
"devDependencies": {
17-
"@types/ejs":"^3.1.1",
18-
"typescript":"^4.9.3",
19-
"vite":"^3.2.4"
17+
"@types/ejs":"^3.1.5",
18+
"typescript":"^5.2.2",
19+
"vite":"^5.0.0"
2020
},
2121
"dependencies": {
22-
"ejs":"^3.1.8"
22+
"ejs":"^3.1.9"
23+
},
24+
"peerDependencies": {
25+
"vite":">=5.0.0"
2326
},
2427
"keywords": [
2528
"vite",

‎readme.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Use[ejs](https://www.npmjs.com/package/ejs) template language in your entrypoint i.e`index.html`
44

5+
**Note:** For Vite version <`5` use[`v1.6.4`](https://www.npmjs.com/package/vite-plugin-ejs/v/1.6.4) of this plugin.
6+
57
##Menu
68

79
-[Installation](#installation)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp