Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@webda/tsc-esm

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webda/tsc-esm

Compile with ES6 Module import correction

latest
Source
npmnpm
Version
1.3.1
Version published
Maintainers
2
Created
Source

@webda/tsc-esm module

This module is part of Webda Application Framework that allows you to quickly develop applications with all modern prerequisites: Security, Extensibility, GraphQL, REST, CloudNative https://webda.io

CI

Join the chat at https://gitter.im/loopingz/webda codecov SonarCloud.io CodeQL

This is a wrapper around tsc to compile typescript to esm format without the culprit of having to add '.js' at the end of your import.

When you work with typescript this is valid

import { MyClass } from './myclass';

But the official compiler will generate a file named myclass.js and you will have to write

import { MyClass } from './myclass.js';

This is not really clean in my opinion, so this wrapper will allow you to use the first syntax and will take care of fixing the .js issue for you.

Reference on the famous issue on typescript: https://github.com/microsoft/TypeScript/issues/16577

Usage

You can run the compiler directly with

npx @webda/tsc-esm

Or add it to your project with

# NPM
npm add --dev @webda/tsc-esm
# Yarn
yarn add --dev @webda/tsc-esm
# pnpm
pnpm add --dev @webda/tsc-esm

Update your package.json to add a script

{
  "scripts": {
    "build": "tsc-esm"
  }
}

Sponsors

Arize AI is a machine learning observability and model monitoring platform. It helps you visualize, monitor, and explain your machine learning models. Learn more

Loopingz is a software development company that provides consulting and development services. Learn more

Tellae is an innovative consulting firm specialized in cities transportation issues. We provide our clients, both public and private, with solutions to support your strategic and operational decisions. Learn more

Keywords

webda

FAQs

Package last updated on 16 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts