LiteLDev / LegacyScriptEngine

A plugin engine for running LLSE plugins on LeviLamina
GNU General Public License v3.0
49 stars 8 forks source link

[Bug]: 无法正常使用import语法 #98

Open LAppleXGR358 opened 7 months ago

LAppleXGR358 commented 7 months ago

Describe the bug

在JavaScript插件中无法正常使用import语法,该用法在旧版LLSE中是完全可用的,导致很多插件无法在新版中使用

To Reproduce

BetterForms.js export class BetterSimpleForm {}; export class BetterCustomForm {};

在LLMyPluginTest.js使用import语法导入模块 import { BetterSimpleForm, BetterCustomForm } from "./plugins/LLMyPlugins/BetterForms.js";

报错信息 18:32:11.206 INFO [legacy-script-engine-quickjs] loading plugin LLMyPluginTest 18:32:11.221 ERROR [legacy-script-engine-quickjs] Failed to load plugin LLMyPluginTest: expecting '(' at :1 18:32:11.221 ERROR [LeviLamina] LLMyPluginTest 加载失败

Expected behavior

插件正常运行无报错

Screenshots

No response

Platform

Windows 10

BDS Version

1.20.72

LeviLamina Version

0.10.5

LegacyScriptEngine Version

0.5.4

Additional context

No response

engsr6982 commented 7 months ago

qjs,正常情况是可以使用import语法

目前已知中文路径会导致import出问题

目前我的插件都正常,用中文路径的都有问题

LAppleXGR358 commented 7 months ago

确实是中文路径的问题,我的BDS安装在中文路径下了,修改后就能正常运行,但是旧版ll我也是安装在中文路径下来着,那时没有出问题