// index.js
import data, { name } from './a.js';
const json = {
...data,
name,
};
// a.js
import * as bData from './b.js';
export const name = 'a文件';
export default bData;
// b.js
export const func = function () {};
export const name = 'b文件';
export const age = 18;
{
func: 'function () {}',
age: 18,
name: 'a文件',
}