Skip to content

Instantly share code, notes, and snippets.

@ca0v
Created September 21, 2018 16:01
Show Gist options
  • Save ca0v/11f7ba0ffa9e3aa3a96e513a9ca58b5f to your computer and use it in GitHub Desktop.
Save ca0v/11f7ba0ffa9e3aa3a96e513a9ca58b5f to your computer and use it in GitHub Desktop.
tsconfig with paths and include fails
export class MyApp {
execute() {
return true;
}
}
import { MyApp } from "@app/myapp";
export function run() {
let app = new MyApp();
console.assert(app.execute());
}
define("app/myapp", ["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MyApp = /** @class */ (function () {
function MyApp() {
}
MyApp.prototype.execute = function () {
return true;
};
return MyApp;
}());
exports.MyApp = MyApp;
});
define("test/mytest", ["require", "exports", "app/myapp"], function (require, exports, myapp_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function run() {
var app = new myapp_1.MyApp();
console.assert(app.execute());
}
exports.run = run;
});
{
"extends": "./tsconfig",
"compilerOptions": {
"outFile": "./built/test.max.js"
},
"include": ["test/**/*.ts"]
}
{
"compilerOptions": {
"declaration": false,
"module": "amd",
"target": "es5",
"noImplicitAny": true,
"sourceMap": false,
"outFile": "./built/app.max.js",
"moduleResolution": "node",
"baseUrl": "./",
"paths": {
"@app/*": ["./app/*"]
}
}
//"include": ["app/**/*.ts"]
}
@ca0v
Copy link
Author

ca0v commented Sep 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment