From eaa1f6829aaad1528f7ea2de47909a4ea3fba946 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 21 Aug 2018 13:15:34 -0400 Subject: [PATCH] Add ts-check to webpack.config.js --- package.json | 1 + webpack.config.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a0b619ec..b5c5feb7 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@types/react": "^16.4.7", "@types/react-dom": "^16.0.6", "@types/tape": "^4.2.32", + "@types/webpack": "^4.4.10", "prettier": "1.14.0", "source-map-loader": "^0.2.3", "tape": "^4.9.1", diff --git a/webpack.config.js b/webpack.config.js index 03811a15..b15677a5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,10 @@ +//@ts-check +/** @typedef {import('webpack').Configuration} WebpackConfig **/ const nodeExternals = require('webpack-node-externals'); -module.exports = [ + +/** @type WebpackConfig[] */ +const configs = [ { entry: { browser: './src/browser.tsx', @@ -60,3 +64,5 @@ module.exports = [ externals: [nodeExternals()], }, ]; + +module.exports = configs; \ No newline at end of file