Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tsconfig.json files #9

Closed
jbrantly opened this issue Feb 24, 2015 · 3 comments
Closed

Support tsconfig.json files #9

jbrantly opened this issue Feb 24, 2015 · 3 comments

Comments

@jbrantly
Copy link
Member

We should try to add support for tsconfig.json files prior to the release of TS 1.5. See microsoft/TypeScript#1692

Part of this change should also include updating the additionalFiles configuration to just be files which matches what is in the configuration file.

@mgutz
Copy link

mgutz commented Mar 31, 2015

+1

@mgutz
Copy link

mgutz commented Mar 31, 2015

FYI, here's the function I use in my project.

/**
 * Convert tsconfig.json file to ts-loader options.
 *
 * @param tsconfig {String} tsconfig.json path.
 */
function tsOptions(tsconfig) {
    var config = require(tsconfig);
    var options = config.compilerOptions;
    options.additionalFiles = config.files.map(function(file) {
        return fp.resolve(fp.join(fp.dirname(tsconfig), file));
    });
    options.instance = "additionalFiles";
    return JSON.stringify(options);
}

@jbrantly
Copy link
Member Author

jbrantly commented May 6, 2015

Added in v0.4.0

@jbrantly jbrantly closed this as completed May 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants