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

PluginConfigs interface

Config of this transformer

Signature:

export interface PluginConfigs 

Properties

Property Type Description
appendExtensionName string | boolean  
appendExtensionNameForRemote boolean  
bareModuleRewrite PluginConfigs[‘rules’] The transformation rule. Specify how this transformer will handle your imports.
dynamicImportPathRewrite false | ‘auto’ | DynamicImportPathRewriteCustom Config how to rewrite dynamic import.
extName string | boolean Add ‘.js’ extension for local import path.
extNameRemote boolean Also append extension ‘.js’ to http:// or https:// URLs.
folderImport boolean Resolve NodeJS style path ‘./x’ to ‘./x/index.js’
globalObject string When using UMD import, this option indicates what global object will be used to find the UMD variables.
importHelpers ‘inline’ | ‘auto’ | ‘cdn’ | ‘node’ | string Import emit helpers (e.g. \__UMDBindCheck, \__dynamicImportTransform, etc..) from ttsclib (a local file in this package).
importMap ImportMapResolution | ImportMapCustomResolution Use import map as the transform rules. (This has the highest priority.)
jsonImport ‘data’ | ‘inline’ | true JSON import
rules Exclude<RewriteRulesObject, RewriteRulesUMD> & Record<string, RewriteRulesObject> The transformation rule. Specify how this transformer will handle your imports.
safeAccess string Use property access syntax to access UMD variable
webModulePath string Used in snowpack. web_modules module path