Skip to content

Commit

Permalink
disable ts caching for typechecking
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jan 9, 2019
1 parent ae96fbb commit b1aa7ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ async function main() {
writeFileSync(__dirname + "/../dist/ncc/loaders/relocate-loader.js", relocateLoader);
writeFileSync(__dirname + "/../dist/ncc/loaders/shebang-loader.js", shebangLoader);
writeFileSync(__dirname + "/../dist/ncc/loaders/ts-loader.js", tsLoader);
await copy(__dirname + "/../src/loaders/uncacheable.js", __dirname + "/../dist/ncc/loaders/uncacheable.js");

// copy typescript types
await copy(
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ module.exports = (
{
test: /\.tsx?$/,
use: [{
loader: __dirname + "/loaders/uncacheable.js"
},
{
loader: __dirname + "/loaders/ts-loader.js",
options: {
compilerOptions: {
Expand Down
4 changes: 4 additions & 0 deletions src/loaders/uncacheable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = function (input) {
this.cacheable(false);
return input;
};

0 comments on commit b1aa7ca

Please sign in to comment.