From 3d64a536e75389a0ba161c8a519068fbe190d1c0 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Tue, 18 Oct 2016 17:21:25 +0300 Subject: [PATCH] fix build --- build/webpack.prod.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/build/webpack.prod.js b/build/webpack.prod.js index a0bca691..240276c0 100644 --- a/build/webpack.prod.js +++ b/build/webpack.prod.js @@ -12,6 +12,18 @@ const BANNER = const IS_MODULE = process.env.IS_MODULE != null; +const TS_RULE = { + test: /\.ts$/, + loader: 'awesome-typescript-loader', + exclude: /(node_modules)/, +}; + +if (IS_MODULE) { + TS_RULE.query = { + noEmitHelpers: false + } +} + const config = { context: root(), devtool: 'source-map', @@ -58,14 +70,7 @@ const config = { exclude: [ /node_modules/ ] - },{ - test: /\.ts$/, - loader: 'awesome-typescript-loader', - exclude: /(node_modules)/, - query: IS_MODULE ? { - noEmitHelpers: false, - } : {} - }, { + }, TS_RULE, { test: /lib[\\\/].*\.css$/, loaders: ['raw-loader'], exclude: [/redoc-initial-styles\.css$/]