|
|
|
@ -14,18 +14,18 @@ document.onselectstart = () => false;
|
|
|
|
|
|
|
|
|
|
window.onload = function ()
|
|
|
|
|
{
|
|
|
|
|
new WebCAD("app");
|
|
|
|
|
new WebCAD("app");
|
|
|
|
|
|
|
|
|
|
// -----热模块替换的代码.
|
|
|
|
|
async function loadFirst()
|
|
|
|
|
{
|
|
|
|
|
let cmd = (await import("./Add-on/testEntity/test")).Test;
|
|
|
|
|
commandMachine.RegisterCommand("tt", new cmd());
|
|
|
|
|
}
|
|
|
|
|
loadFirst(); // 必须先加载一次,否则无法触发热模块替换
|
|
|
|
|
// -----热模块替换的代码.
|
|
|
|
|
async function loadFirst()
|
|
|
|
|
{
|
|
|
|
|
let cmd = (await import("./Add-on/testEntity/test")).Test;
|
|
|
|
|
commandMachine.RegisterCommand("tt", new cmd());
|
|
|
|
|
}
|
|
|
|
|
loadFirst(); // 必须先加载一次,否则无法触发热模块替换
|
|
|
|
|
|
|
|
|
|
if (module.hot)
|
|
|
|
|
{
|
|
|
|
|
module.hot.accept('./Add-on/testEntity/test', loadFirst)
|
|
|
|
|
}
|
|
|
|
|
if (module.hot)
|
|
|
|
|
{
|
|
|
|
|
module.hot.accept('./Add-on/testEntity/test', loadFirst)
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|