tsconfig: Enable resolveJsonModule.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-05-26 16:02:28 -07:00 committed by Tim Abbott
parent 0ad8fff35d
commit e950344078
2 changed files with 4 additions and 4 deletions

View File

@ -10,10 +10,9 @@ import TerserPlugin from 'terser-webpack-plugin';
// The devServer member of webpack.Configuration is managed by the
// webpack-dev-server package. We are only importing the type here.
import _webpackDevServer from 'webpack-dev-server';
import assets from './webpack.assets.json';
import webpack from 'webpack';
const assets: { [name: string]: string[] } = require('./webpack.assets.json');
export default (env?: string): webpack.Configuration[] => {
const production: boolean = env === "production";
const config: webpack.Configuration = {
@ -247,8 +246,8 @@ export default (env?: string): webpack.Configuration[] => {
if (!production) {
// Out JS debugging tools
for (const name of Object.keys(config.entry)) {
assets[name].push('./static/js/debug.js');
for (const paths of Object.values(assets)) {
paths.push('./static/js/debug.js');
}
config.devServer = {
clientLogLevel: "error",

View File

@ -18,6 +18,7 @@
"module": "ES6",
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"sourceMap": true,
/* Strict type-checking */