ttypescript-browser-like-import-transformer

A custom transformer that can be used with ttypescript to transform ts imports to browser style imports


Project maintained by Jack-Works Hosted on GitHub Pages — Theme by mattgraham

Home > config > PluginConfigs > extNameRemote

PluginConfigs.extNameRemote property

Also append extension ‘.js’ to http:// or https:// URLs.

Signature:

extNameRemote?: boolean

Example

Source code:

Filename: extName-default.ts

import './local-file'
import '/local-file'
import 'http://remote/file'

Outputs:

Filename: extNameRemote-false.js

// CompilerOptions: {"module":"ESNext"}
// PluginConfig: {"extNameRemote":false}
import "./local-file.js";
import "/local-file.js";
import 'http://remote/file';

Filename: extNameRemote-true.js

// CompilerOptions: {"module":"ESNext"}
// PluginConfig: {"extNameRemote":true}
import "./local-file.js";
import "/local-file.js";
import "http://remote/file.js";