Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the unhomoglyph data to its own file #26095

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/vector/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,16 @@
<body style="height: 100%; margin: 0;">
<noscript>Sorry, Element requires JavaScript to be enabled.</noscript> <!-- TODO: Translate this? -->
<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 -->
<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;"/>
Expand Down
11 changes: 11 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
Loading