想要在ts中使用es module,需要进行下面的配置:

    webpack.config.js:

    image.png

    tsconfig.json:

    image.png

    配置完成后即可:

    image.png
    image.png