@0x706b/ts-transform-esm-specifier 中文文档教程

发布于 4年前 浏览 25 更新于 3年前

ts-transform-esm-module-specifier

NOTE: This transformer is entirely experimental. Use it at your own risk.

I highly recommend making a backup of any work before testing this. It shouldn't destroy anything, but I can't promise that. So don't hold me liable if your project get mangled or your computer explodes :)

将 typescript 导入语句转换为 node.js ES 模块系统当前接受的格式。

例如:

import { thing } from "folder/file"

成为

import { thing } from "folder/file.js"

import { thing } from "folder/anotherFolder"

成为

import { thing } from "folder/anotherFolder/index.js"

ts-transform-esm-module-specifier

NOTE: This transformer is entirely experimental. Use it at your own risk.

I highly recommend making a backup of any work before testing this. It shouldn't destroy anything, but I can't promise that. So don't hold me liable if your project get mangled or your computer explodes :)

Transforms typescript import statements into a format currently accepted by node.js ES Module system.

For example:

import { thing } from "folder/file"

becomes

import { thing } from "folder/file.js"

and

import { thing } from "folder/anotherFolder"

becomes

import { thing } from "folder/anotherFolder/index.js"
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文