How does ES6Module load as a whole?

excuse me, now that I have the time, route tool function file, how can I unify the proxy output in index?

in time.js

export cosnt time1
export cosnt time2

in route.js

export cosnt route1
export cosnt route2

how to output time.js and route.js as a whole in index.js
and then you can

import {time1} from "./index"

I use

now.
export * from "./time"
export * from "./route"

then report exports is not defined?
in addition, there are many functions in time and route.

Mar.23,2021

is export written as exports


The

* symbol is only used in import , and
if you have to use *, you can

import * as all from './time';
export all

ps:* use as little as possible


import * as route from './route';
import * as time from './time';

export {
  ...route,
  ...time,
};
Menu