From 3c24927fc4c04634d05ed94079eaa8bd8071a761 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Wed, 6 Jun 2018 17:01:02 -0400 Subject: [PATCH] Fix useBabel use option in razzzle-plugin-typescript (#639) --- packages/razzle-plugin-typescript/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/razzle-plugin-typescript/index.js b/packages/razzle-plugin-typescript/index.js index d2db0a577..9d2861612 100644 --- a/packages/razzle-plugin-typescript/index.js +++ b/packages/razzle-plugin-typescript/index.js @@ -57,7 +57,7 @@ function modify(baseConfig, { target, dev }, webpack, userOptions = {}) { if (options.useBabel) { // If using babel, also add babel-loader to ts files, // so we can use babel plugins on tsx files too - tsLoader.use = [babelLoader.use[1], ...tsLoader.use]; + tsLoader.use = [...babelLoader.use, ...tsLoader.use]; } else { // If not using babel, remove it config.module.rules = config.module.rules.filter(