fix: 编译错误

This commit is contained in:
2023-07-21 04:30:18 +08:00
parent 735170b897
commit 7fe4908131
7 changed files with 38 additions and 28 deletions

View File

@ -1,9 +1,9 @@
<% dir.forEach(name => { -%>
import <%- name %> from './<%- name %>/index.vue';
<% dir.forEach(dirPath => { -%>
import <%- dirPathToName(dirPath) %> from './<%- dirPath %>/index.vue';
<% }) -%>
export {
<% dir.forEach((name, index) => { -%>
<%- name %><% if (dir.length>index+1) { %>,<% } %>
<% dir.forEach((dirPath, index) => { -%>
<%- dirPathToName(dirPath) %><% if (dir.length>index+1) { %>,<% } %>
<% }) -%>
}

View File

@ -2,12 +2,12 @@
Object.defineProperty(exports, '__esModule', { value: true });
<% dir.forEach(name => { -%>
var <%- name %> = require('./<%- name %>/index.js');
<% dir.forEach(dirPath => { -%>
var <%- dirPathToName(dirPath) %> = require('./<%- dirPath %>/index.js');
<% }) -%>
var Components = [
<% dir.forEach(name => { -%>
<%- name %>,
<% dir.forEach(dirPath => { -%>
<%- dirPathToName(dirPath) %>,
<% }) -%>
]