From 777f4609573b2a7becdf271c6a55fecf55709b2b Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 22 Jan 2019 13:48:43 -0600 Subject: [PATCH] Use options instead of separate tsconfig Negates the need to duplicate the HappyPack config. --- packages/server/src/server.ts | 2 +- packages/web/tsconfig.json | 8 -------- packages/web/webpack.common.config.js | 20 +++++++------------- 3 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 packages/web/tsconfig.json diff --git a/packages/server/src/server.ts b/packages/server/src/server.ts index 4116ebc1..ae6f23f5 100644 --- a/packages/server/src/server.ts +++ b/packages/server/src/server.ts @@ -35,7 +35,7 @@ export const createApp = (registerMiddleware?: (app: express.Application) => voi try { ws.send(data); } catch (error) { - logger.error(error.message, field("error", error)); + logger.error(error.message); } }, onClose: (cb): void => ws.addEventListener("close", () => cb()), diff --git a/packages/web/tsconfig.json b/packages/web/tsconfig.json deleted file mode 100644 index 62f55bfd..00000000 --- a/packages/web/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "target": "es5", - "lib": ["dom", "esnext"], - "importHelpers": true - } -} diff --git a/packages/web/webpack.common.config.js b/packages/web/webpack.common.config.js index 3c5b1c37..420c155d 100644 --- a/packages/web/webpack.common.config.js +++ b/packages/web/webpack.common.config.js @@ -2,7 +2,6 @@ const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); const PreloadWebpackPlugin = require("preload-webpack-plugin"); -const HappyPack = require("happypack"); const root = path.resolve(__dirname, "..", ".."); const fills = path.join(root, "packages", "ide", "src", "fill"); const vsFills = path.join(root, "packages", "vscode", "src", "fill"); @@ -96,17 +95,12 @@ module.exports = merge({ rel: "preload", as: "script", }), - new HappyPack({ - id: "ts", - threads: 2, - loaders: [{ - path: "ts-loader", - query: { - happyPackMode: true, - configFile: path.join(__dirname, "tsconfig.json"), - }, - }], - }), ], target: "web", -}, require(path.join(root, "scripts", "webpack.general.config.js"))()); +}, require(path.join(root, "scripts", "webpack.general.config.js"))({ + typescriptCompilerOptions: { + "target": "es5", + "lib": ["dom", "esnext"], + "importHelpers": true, + }, +}));