Skip to content

Commit cff04d7

Browse files
committed
Fix the missing initWidget
Reference to stevenjoezhang#176
1 parent 8fb3d28 commit cff04d7

File tree

8 files changed

+7
-7
lines changed

8 files changed

+7
-7
lines changed
File renamed without changes.
File renamed without changes.

build/waifu-tips.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
* @file 包含初始化看板娘小部件的入口。
33
* @module waifu-tips
44
*/
5-
import initWidget from './index.js';
5+
import initWidget from './initWidget.js';
66
window.initWidget = initWidget;

dist/autoload.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// live2d_path 参数建议使用绝对路径
2-
const live2d_path = "https://fastly.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/";
3-
//const live2d_path = "/live2d-widget/";
2+
// const live2d_path = "https://fastly.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/";
3+
const live2d_path = "/dist/";
44

55
// 封装异步加载资源的方法
66
function loadExternalResource(url, type) {
@@ -34,7 +34,7 @@ if (screen.width >= 768) {
3434
// 配置选项的具体用法见 README.md
3535
initWidget({
3636
waifuPath: live2d_path + "waifu-tips.json",
37-
//apiPath: "https://live2d.fghrsh.net/api/",
37+
apiPath: "https://live2d.fghrsh.net/api/",
3838
cdnPath: "https://fastly.jsdelivr.net/gh/fghrsh/live2d_api/",
3939
tools: ["hitokoto", "asteroids", "switch-model", "switch-texture", "photo", "info", "quit"]
4040
});

dist/waifu-tips.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function string(opts = {}) {
3434
}
3535

3636
export default {
37-
input: 'build/index.js',
37+
input: 'build/waifu-tips.js',
3838
output: {
3939
name: 'live2d_widget',
4040
file: 'dist/waifu-tips.js',
File renamed without changes.

src/waifu-tips.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
* @module waifu-tips
44
*/
55

6-
import initWidget from './index.js';
6+
import initWidget from './initWidget.js';
77

88
window.initWidget = initWidget;

0 commit comments

Comments
 (0)