Use options instead of separate tsconfig

Negates the need to duplicate the HappyPack config.
This commit is contained in:
Asher 2019-01-22 13:48:43 -06:00 committed by Kyle Carberry
parent e7d7ff3733
commit 777f460957
No known key found for this signature in database
GPG Key ID: A0409BDB6B0B3EDB
3 changed files with 8 additions and 22 deletions

View File

@ -35,7 +35,7 @@ export const createApp = (registerMiddleware?: (app: express.Application) => voi
try { try {
ws.send(data); ws.send(data);
} catch (error) { } catch (error) {
logger.error(error.message, field("error", error)); logger.error(error.message);
} }
}, },
onClose: (cb): void => ws.addEventListener("close", () => cb()), onClose: (cb): void => ws.addEventListener("close", () => cb()),

View File

@ -1,8 +0,0 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"target": "es5",
"lib": ["dom", "esnext"],
"importHelpers": true
}
}

View File

@ -2,7 +2,6 @@ const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const PreloadWebpackPlugin = require("preload-webpack-plugin"); const PreloadWebpackPlugin = require("preload-webpack-plugin");
const HappyPack = require("happypack");
const root = path.resolve(__dirname, "..", ".."); const root = path.resolve(__dirname, "..", "..");
const fills = path.join(root, "packages", "ide", "src", "fill"); const fills = path.join(root, "packages", "ide", "src", "fill");
const vsFills = path.join(root, "packages", "vscode", "src", "fill"); const vsFills = path.join(root, "packages", "vscode", "src", "fill");
@ -96,17 +95,12 @@ module.exports = merge({
rel: "preload", rel: "preload",
as: "script", as: "script",
}), }),
new HappyPack({
id: "ts",
threads: 2,
loaders: [{
path: "ts-loader",
query: {
happyPackMode: true,
configFile: path.join(__dirname, "tsconfig.json"),
},
}],
}),
], ],
target: "web", 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,
},
}));