mirror of https://github.com/zulip/zulip.git
tsconfig: Enable resolveJsonModule.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
0ad8fff35d
commit
e950344078
|
@ -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",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"module": "ES6",
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
|
||||
/* Strict type-checking */
|
||||
|
|
Loading…
Reference in New Issue