The Typescript module is a file, how to operate it? Parcel Packaging tool used

I want to compile multiple TS files into a JS file in import order. Typescript itself does not seem to have this function, so I tried the Parcel tool, but after packaging, it was not what I thought, but it generated a lot of module solutions of his own.

File:

demoA.ts
// code
export default () => {
    console.log("hello world...!");
}
demoB.ts
// code
import hello from "./demoA";
hello();

I hope that the merged file will import the code in the module sequentially, and ask for advice on how to achieve this requirement. Can Parcel fulfill this requirement? Ask the gods for help.

Menu