Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Oct 22, 2024
1 parent 6afd9f5 commit 9f98c1f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default defineConfig({
new NodePolyfillPlugin({
//additionalAliases: ['console'],
}),
new rspack.BannerPlugin({
banner: `console.log('Date: ${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}');`,
raw: true,
}),
new rspack.BannerPlugin({
banner: `console.log('Version: ${pkg.version}');`,
raw: true,
Expand All @@ -26,11 +30,11 @@ export default defineConfig({
raw: true,
}),
new rspack.BannerPlugin({
banner: "console.log('🍿️ DualSubs: 🔣 Universal');",
banner: `console.log('${pkg.displayName}');`,
raw: true,
}),
new rspack.BannerPlugin({
banner: "https://DualSubs.github.io",
banner: pkg.homepage,
}),
],
performance: false,
Expand Down
8 changes: 6 additions & 2 deletions rspack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default defineConfig({
new NodePolyfillPlugin({
//additionalAliases: ['console'],
}),
new rspack.BannerPlugin({
banner: `console.log('Date: ${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}');`,
raw: true,
}),
new rspack.BannerPlugin({
banner: `console.log('Version: ${pkg.version}');`,
raw: true,
Expand All @@ -26,11 +30,11 @@ export default defineConfig({
raw: true,
}),
new rspack.BannerPlugin({
banner: "console.log('🍿️ DualSubs: 🔣 Universal β');",
banner: `console.log('${pkg.displayName} β');`,
raw: true,
}),
new rspack.BannerPlugin({
banner: "https://DualSubs.github.io",
banner: pkg.homepage,
}),
],
performance: false,
Expand Down
2 changes: 1 addition & 1 deletion src/function/detectFormat.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { log } from "../utils/utils.mjs";
import { URL, log } from "../utils/utils.mjs";

/**
* detect Format
Expand Down
2 changes: 1 addition & 1 deletion src/function/setENV.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { _, log } from "../utils/utils.mjs";
*/
export default function setENV(name, platforms, database) {
log(`☑️ Set Environment Variables`, "");
let { Settings, Caches, Configs } = getStorage(name, platforms, database);
const { Settings, Caches, Configs } = getStorage(name, platforms, database);
/***************** Settings *****************/
if (!Array.isArray(Settings?.Types)) Settings.Types = (Settings.Types) ? [Settings.Types] : []; // 只有一个选项时,无逗号分隔
log(`✅ Set Environment Variables, Settings: ${typeof Settings}, Settings内容: ${JSON.stringify(Settings)}`, "");
Expand Down

0 comments on commit 9f98c1f

Please sign in to comment.