tsconfig.json suggestions #45
Comments
Thank you very much for the ideas.
When you are in typescript mode and do an import that looks like Let me know what you think Cheers |
Regarding the strictness: I think this suggestion is a plausible approach (read the contents, minify, feed into Although the best solution in my opinion would be for ts to expose a EDIT: apparently the aforementioned parseConfigFileTextToJson() is already exposed. Example usage: const fs = require('fs');
const ts = require('typescript');
const configPath = './tsconfig.json';
const tsconfig = fs.readFileSync(configPath).toString();
const parsedConfig = ts.parseConfigFileTextToJson(configPath, tsconfig); // the first argument seems to be used only for diagnostics
// parsedConfig.config contains the configuration object that can be passed to fuse-box |
the way i see it is really simple, just provide option to take the path relative to project dir, and feed it to TS and that is all. Fuse is now and should always be transparent about plugins, in essence it should only receive content wither it is compiled or not and do the bundling. |
this is now supported, please reopen if otherwise :) |
A couple of ideas that popped into my mind when trying to get FuseBox to work with TS and React (all in reference to getTypeScriptConfig())
tsConfig
option (I don't think I've seen it anywhere in the docs or the site)tsconfig.json
file (by default it looks inhomeDir
, but I think I'm not the only one that prefers to keep histsconfig.json
in project's root and not insrc
dir together with the sources, nor do I find it clean to add symlinks); one can work around the lack of this feature by reading the contents oftsconfig.json
from a different location and feeding it to FuseBox through thetsConfig
option, but I believe this to be a common enough use-case to consider adding it as a separate optiontsconfig.json
than usingrequire
(afaik TS lets you keep comments in your config,require
is too strict about the JSON structure for that and it would be nice to reuse the same ts config across all tools).tsx
files do not to trigger switching to typescript mode and yet my project bundles without problems (probably because of things like this and this) also I don't know the significance of ensureFolderAndExtensions but it seems to depend ontsMode
and assume a.ts
extensionThe text was updated successfully, but these errors were encountered: