A custom transformer that can be used with ttypescript to transform ts imports to browser style imports
Home > config > PluginConfigs
Config of this transformer
Signature:
export interface PluginConfigs
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 |