Skip to content

Commit

Permalink
fix: resolve issue of duplicate resource references due to imports (#604
Browse files Browse the repository at this point in the history
)
  • Loading branch information
LIlGG authored Feb 5, 2025
1 parent 241ffe3 commit 4cc82ae
Show file tree
Hide file tree
Showing 39 changed files with 49 additions and 24 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_THEME_VERSION=2.4.2
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface Sakura {

declare var Sakura: {
prototype: Sakura;
new (config?: object): Sakura;
new(config?: object): Sakura;
};

export interface ThemeConfig {
Expand Down Expand Up @@ -291,7 +291,7 @@ export class SakuraApp implements Sakura {
callback(error, null);
});
},
init: () => {},
init: () => { },
},
];
if (import.meta.env.MODE !== "development") {
Expand Down Expand Up @@ -464,7 +464,7 @@ export class SakuraApp implements Sakura {
}
// 也可以通过 `./page/index` 这类具体名称处理,优点是不需要加上 min.js,缺点是需要特殊处理
const version = sakura.getPageConfig("version");
const modulePath = `./page/${_templateId}.min.js?v=${version}`;
const modulePath = `./page/${_templateId}-${version}.min.js`;
await import(modulePath);
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions templates/assets/dist/libs/pjax-2.4.2.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion templates/assets/dist/libs/pjax.min.js

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions templates/assets/dist/page/archives-2.4.2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion templates/assets/dist/page/archives.min.js

This file was deleted.

1 change: 1 addition & 0 deletions templates/assets/dist/page/categories-2.4.2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion templates/assets/dist/page/categories.min.js

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions templates/assets/dist/page/index-2.4.2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion templates/assets/dist/page/index.min.js

This file was deleted.

1 change: 1 addition & 0 deletions templates/assets/dist/page/moments-2.4.2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4cc82ae

Please sign in to comment.