mirror of https://github.com/vector-im/riot-web
Move the unhomoglyph data to its own file (#26095)
This solves problems wherein the javascript debugger would get confused and show the execution point two lines away from the source.pull/26122/head
parent
bff5b6e8e2
commit
00803950bf
|
@ -61,7 +61,16 @@
|
||||||
<body style="height: 100%; margin: 0;">
|
<body style="height: 100%; margin: 0;">
|
||||||
<noscript>Sorry, Element requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
|
<noscript>Sorry, Element requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
|
||||||
<section id="matrixchat" style="height: 100%;" class="notranslate"></section>
|
<section id="matrixchat" style="height: 100%;" class="notranslate"></section>
|
||||||
<script src="<%= htmlWebpackPlugin.files.js.find(entry => entry.includes("bundle.js")) %>"></script>
|
|
||||||
|
<%
|
||||||
|
// insert <script> tags for the JS entry points
|
||||||
|
for (let file of htmlWebpackPlugin.files.js) {
|
||||||
|
if (file.includes("bundle.js") || file.includes("unhomoglyph_data")) {
|
||||||
|
%> <script src="<%= file %>"></script>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
<!-- Legacy supporting Prefetch images -->
|
<!-- Legacy supporting Prefetch images -->
|
||||||
<img src="<%= require('matrix-react-sdk/res/img/warning.svg').default %>" aria-hidden alt="" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
|
<img src="<%= require('matrix-react-sdk/res/img/warning.svg').default %>" aria-hidden alt="" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
|
||||||
|
|
|
@ -171,6 +171,17 @@ module.exports = (env, argv) => {
|
||||||
enforce: true,
|
enforce: true,
|
||||||
// Do not add `chunks: 'all'` here because you'll break the app entry point.
|
// 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: {
|
default: {
|
||||||
reuseExistingChunk: true,
|
reuseExistingChunk: true,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue