Closed maier49 closed 7 years ago
@maier49 could we do this by just providing specific test related options to ts-loader
? rather than putting a dependency on the end user having to have a non-standard extra tsconfig in their project (especially if they are not using create-app?)
@matt-gadd It appears that ts-loader ignores include
or exclude
options and defers to tsconfig. I tested include
locally to make sure. I understand the concern about requiring an extra config file though. Maybe there's another approach to this but I'm struggling to think of one at the moment.
Sorry I meant the ts-loader
options (not the webpack loader options as in that issue). It looks like you can currently only provide the compilerOptions
part of the tsconfig
though. You can provide a separate tsconfig
path like you have, so we could potentially write a temp file instead (effectively making it internal), but ideally it would be nice to just pass an object for the config, which we could perhaps explore as a PR to ts-loader
?
I think we should at least create a temporary tsconfig for tests "on the fly" if we can't get the preferred solution. I really don't want to have to have a none standard tsconfig file in order to use the build and test command.
Closing in favor of generating a temp test config on the fly or deferring to config in ts-loader if they accept a PR.
The following has been addressed in the PR:
Description: This updates the build so that it uses separate tsconfig files for
dojo build
anddojo build -t
.dojo build
would use a tsconfig file that only compiles sources files, and the tsconfig file fordojo build -t
would also compile tests. Relies on dojo/cli-create-app#89 to create the separate config files in a new project. Resolves #113