@ts-liveserver/ts-transpiler
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -9,8 +9,9 @@ "use strict"; | ||
const RESOLVE_EXTENSIONS = ['.js', '.ts', '.tsx', '.jsx', '.json', '.mjs']; | ||
const ALIAS_FIELDS = ['browser', 'module']; | ||
class DependencyResolver { | ||
constructor(alias = {}) { | ||
this.resolver = enhanced_resolve_1.default.create.sync({ | ||
mainFields: ['browser', 'module', 'main'], | ||
mainFields: [...ALIAS_FIELDS, 'main'], | ||
extensions: RESOLVE_EXTENSIONS, | ||
aliasFields: ['browser'], | ||
aliasFields: ALIAS_FIELDS, | ||
}); | ||
@@ -17,0 +18,0 @@ this.alias = alias; |
@@ -7,2 +7,3 @@ "use strict"; | ||
const typescript_1 = __importDefault(require("typescript")); | ||
// eslint-disable-next-line no-shadow | ||
var KEYNAME; | ||
@@ -146,3 +147,3 @@ (function (KEYNAME) { | ||
...importDeclarations, | ||
typescript_1.default.factory.updateVariableStatement(node, undefined, typescript_1.default.factory.updateVariableDeclarationList(node.declarationList, variableDeclarations)), | ||
typescript_1.default.factory.updateVariableStatement(node, node.modifiers, typescript_1.default.factory.updateVariableDeclarationList(node.declarationList, variableDeclarations)), | ||
]; | ||
@@ -149,0 +150,0 @@ } |
@@ -30,3 +30,3 @@ "use strict"; | ||
const resolvedName = this.getDependencyName(sourceFile.fileName, node.moduleSpecifier.text); | ||
return typescript_1.default.factory.updateExportDeclaration(node, undefined, undefined, node.isTypeOnly, undefined, typescript_1.default.factory.createStringLiteral(resolvedName)); | ||
return typescript_1.default.factory.updateExportDeclaration(node, node.decorators, node.modifiers, node.isTypeOnly, node.exportClause, typescript_1.default.factory.createStringLiteral(resolvedName)); | ||
} | ||
@@ -33,0 +33,0 @@ return node; |
@@ -17,3 +17,3 @@ "use strict"; | ||
const DependencyResolver_1 = __importDefault(require("./DependencyResolver")); | ||
const RESOLVE_EXTENSIONS = ['.js', '.ts', '.tsx', '.jsx', '.json']; | ||
const RESOLVE_EXTENSIONS = ['.js', '.ts', '.tsx', '.jsx', '.json', '.mjs']; | ||
class TsTranspiler { | ||
@@ -20,0 +20,0 @@ constructor(options) { |
{ | ||
"name": "@ts-liveserver/ts-transpiler", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"license": "ISC", | ||
@@ -34,3 +34,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "e2a1f0ee4d280d47e29c6c94559f9650943e5e6c" | ||
"gitHead": "6de71323ee392e5ead47e4ded74b580c64085641" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
91969
39
1081
1
29