From c58bdb929044075e623fc4f9d64e10d671cc7d94 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 1 Sep 2023 15:18:07 +0100 Subject: [PATCH] Move the unhomoglyph data to its own file This solves problems wherein the javascript debugger would get confused and show the execution point two lines away from the source. --- src/vector/index.html | 11 ++++++++++- webpack.config.js | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/vector/index.html b/src/vector/index.html index 9f41e6c2161..962de99d4ae 100644 --- a/src/vector/index.html +++ b/src/vector/index.html @@ -61,7 +61,16 @@
- + +<% + // insert +<% + } + } +%> diff --git a/webpack.config.js b/webpack.config.js index 14cca1303d0..9b6059f82e5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -171,6 +171,17 @@ module.exports = (env, argv) => { enforce: true, // Do not add `chunks: 'all'` here because you'll break the app entry point. }, + + // put the unhomoglyph data in its own file. It contains + // magic characters which mess up line numbers in the + // javascript debugger. + unhomoglyph_data: { + name: "unhomoglyph_data", + test: /unhomoglyph\/data\.json$/, + enforce: true, + chunks: "all", + }, + default: { reuseExistingChunk: true, },