Skip to content

Commit 686ba80

Browse files
committed
cleanup
1 parent a0dfa00 commit 686ba80

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

webpack.config.js

+9-17
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@ const cacheGroups = {
185185
};
186186

187187
const babelOptions = {...babelConfig, cacheDirectory: true};
188+
const babelLoaderConfig = {loader: 'babel-loader', options: babelOptions};
189+
190+
const tsLoaderConfig = {
191+
loader: 'ts-loader',
192+
options: {
193+
transpileOnly: false,
194+
},
195+
};
188196

189197
/**
190198
* Main Webpack config for Sentry React SPA.
@@ -225,23 +233,7 @@ let appConfig = {
225233
test: /\.tsx?$/,
226234
include: [staticPrefix],
227235
exclude: /(vendor|node_modules|dist)/,
228-
use: [
229-
...(!IS_CI
230-
? [
231-
{
232-
loader: 'babel-loader',
233-
options: babelOptions,
234-
},
235-
]
236-
: [
237-
{
238-
loader: 'ts-loader',
239-
options: {
240-
transpileOnly: false,
241-
},
242-
},
243-
]),
244-
],
236+
use: [!IS_CI ? babelLoaderConfig : tsLoaderConfig],
245237
},
246238
{
247239
test: /\.po$/,

0 commit comments

Comments
 (0)