html 类自动变换,配置 hash后html上引用 怎么自动变换?

好的,谢谢

邮箱:11187136@qq.com

签名由 网易邮箱大师 定制

在2018年03月08日 08:45,ianyang1207 写道: 在.webpackrc里面加上如下配置。

"html":{

"template": "./src/index.ejs",

"一些可以用在index.ejs里面的变量名": "变量值",

“title”: "myApp"

}

index.ejs样例如下

loading

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/sorrycc/roadhog","title":"sorrycc/roadhog","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/sorrycc/roadhog"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ianyang1207 in #625: 在.webpackrc里面加上如下配置。\r\n\r\n```\r\n\"html\":{\r\n \"template\": \"./src/index.ejs\",\r\n \"一些可以用在index.ejs里面的变量名\": \"变量值\",\r\n “title”: \"myApp\"\r\n}\r\n```\r\n\r\nindex.ejs样例如下\r\n\r\n```\r\n\u003c!DOCTYPE html\u003e\r\n\u003chtml lang=\"en\"\u003e\r\n\u003chead\u003e\r\n \u003cmeta charset=\"UTF-8\"\u003e\r\n \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\"\u003e\r\n \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\r\n \u003clink rel=\"icon\" href=\"*\" type=\"image/x-icon\"\u003e\r\n \u003clink rel=\"apple-touch-icon\" href=\"*\"\u003e\r\n \u003ctitle\u003e\u003c%= htmlWebpackPlugin.options.title %\u003e\u003c/title\u003e\r\n\u003c/head\u003e\r\n\u003cbody\u003e\r\n \u003cdiv id=\"root\"\u003eloading\u003c/div\u003e\r\n\u003c/body\u003e\r\n\u003c/html\u003e\r\n```"}],"action":{"name":"View Issue","url":"#625 (comment)"}}}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值