[Chore] Add a note for experimental feature globalSync.

Remove comments.
Set version to tauri.conf.json(3.0.0 is just restore from pre-checkout develop branch, though.)
This commit is contained in:
Sakamoto Shiina
2025-05-04 02:41:14 +09:00
parent 8316c24d0d
commit b5364cc705
2 changed files with 3 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "VRCT", "productName": "VRCT",
"version": "0.1.0", "version": "3.0.0",
"identifier": "com.vrct.app", "identifier": "com.vrct.app",
"build": { "build": {
"beforeDevCommand": "", "beforeDevCommand": "",

View File

@@ -93,20 +93,18 @@ export default defineConfig(async () => {
const getPluginAliases = async () => { const getPluginAliases = async () => {
const aliases = {}; const aliases = {};
const raw_config_files = globSync("src-ui/plugins/*/plugin_configs.js"); const raw_config_files = globSync("src-ui/plugins/*/plugin_configs.js"); // [Note] globSync is an experimental feature Node.js. If any error happened, use node.js v22.15.0 that I confirmed it works.
const config_files = raw_config_files.map(p => p.split(path.sep).join("/")); const config_files = raw_config_files.map(p => p.split(path.sep).join("/"));
for (const plugin of dev_plugins) { for (const plugin of dev_plugins) {
const entry_path = plugin.entry_path; // 例: "dev_plugin_subtitles" const entry_path = plugin.entry_path;
const relative_config_path = `src-ui/plugins/${entry_path}/plugin_configs.js`; const relative_config_path = `src-ui/plugins/${entry_path}/plugin_configs.js`;
// 該当エントリのファイルがなければスキップ
if (!config_files.includes(relative_config_path)) { if (!config_files.includes(relative_config_path)) {
continue; continue;
} }
try { try {
// Node 実行環境用に絶対パスを生成し、動的 import
const full_path = path.resolve(__dirname, relative_config_path); const full_path = path.resolve(__dirname, relative_config_path);
const file_url = pathToFileURL(full_path).href; const file_url = pathToFileURL(full_path).href;
const plugin_config = await import(file_url); const plugin_config = await import(file_url);