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
|
// The devServer member of webpack.Configuration is managed by the
|
||||||
// webpack-dev-server package. We are only importing the type here.
|
// webpack-dev-server package. We are only importing the type here.
|
||||||
import _webpackDevServer from 'webpack-dev-server';
|
import _webpackDevServer from 'webpack-dev-server';
|
||||||
|
import assets from './webpack.assets.json';
|
||||||
import webpack from 'webpack';
|
import webpack from 'webpack';
|
||||||
|
|
||||||
const assets: { [name: string]: string[] } = require('./webpack.assets.json');
|
|
||||||
|
|
||||||
export default (env?: string): webpack.Configuration[] => {
|
export default (env?: string): webpack.Configuration[] => {
|
||||||
const production: boolean = env === "production";
|
const production: boolean = env === "production";
|
||||||
const config: webpack.Configuration = {
|
const config: webpack.Configuration = {
|
||||||
|
@ -247,8 +246,8 @@ export default (env?: string): webpack.Configuration[] => {
|
||||||
|
|
||||||
if (!production) {
|
if (!production) {
|
||||||
// Out JS debugging tools
|
// Out JS debugging tools
|
||||||
for (const name of Object.keys(config.entry)) {
|
for (const paths of Object.values(assets)) {
|
||||||
assets[name].push('./static/js/debug.js');
|
paths.push('./static/js/debug.js');
|
||||||
}
|
}
|
||||||
config.devServer = {
|
config.devServer = {
|
||||||
clientLogLevel: "error",
|
clientLogLevel: "error",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"module": "ES6",
|
"module": "ES6",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
"resolveJsonModule": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
|
|
||||||
/* Strict type-checking */
|
/* Strict type-checking */
|
||||||
|
|
Loading…
Reference in New Issue