dai-cli
详细信息
index.js 4(+1 -3)
diff --git a/index.js b/index.js
index 75c7f53..39590af 100644
--- a/index.js
+++ b/index.js
@@ -205,9 +205,7 @@ let exec = function () {
{
let text = await fs.readFile('./main/modules.js');
text = text.toString();
- text += `
-import ${answers.name} from '../modules/${answers.name}/index.js';
-export { ${answers.name} };`;
+ text += `export { default as ${answers.name} } from '../modules/${answers.name}/index.js'`;
await fs.writeFile('./main/modules.js', text);
}
//删除无用文件
package.json 2(+1 -1)
diff --git a/package.json b/package.json
index 85c03f0..91dccd0 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "dai-cli",
"type": "module",
- "version": "1.0.8",
+ "version": "1.0.9",
"description": "description",
"main": "index.js",
"scripts": {