Commit e1ba2b1a authored by Medicean's avatar Medicean

(Fix:Core) 修复编码器保存后不生效的问题 #135 (thx @K4ngx)

parent 927c51fc
......@@ -7,6 +7,7 @@
### 核心
* 执行命令新增 `antsystem` 函数, 具体见: https://github.com/AntSwordProject/ant_php_extension
* Fix 编码器保存后不生效的问题 #135 (thx @K4ngx)
## 2019/03/20 `v(2.0.6)`
......
......@@ -182,6 +182,8 @@ class Base {
*/
parseEncoder(enc) {
// 加载编码器
// https://github.com/AntSwordProject/antSword/issues/135#issuecomment-475842870
delete require.cache[require.resolve(`${enc}`)];
// QAQ!我也不知道为什么,如果直接require变量名,babel编译就会warning,so我只好加个`咯~
this['__encoder__'][enc.indexOf(`encoder/`) > -1 ? enc.split(`encoder/`)[1]:enc.split(`encoder\\`)[1]] = require(`${enc}`);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment