Skip to content
Snippets Groups Projects
Commit 5afea744 authored by Benedikt's avatar Benedikt
Browse files

now using the bundled js instead of unbundled preparation for cdn delivery

parent 9680a693
Branches
No related tags found
No related merge requests found
Pipeline #51877 passed
......@@ -4,3 +4,5 @@ dcc-viewer/node_modules/
node_modules/
coverage/
dist/
......@@ -5,7 +5,7 @@
xsi:schemaLocation="https://ptb.de/dcc https://gitlab1.ptb.de/digitaldynamicmeasurement/dccanddsischemawithoutdepricatedelements/-/raw/main/dcc.xsd"
schemaVersion="3.3.0">
<!-- Embedded XSLT stylesheet -->
<!-- Embedded XSLT stylesheet for production -->
<xsl:stylesheet id="embeddedXSL" version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common">
......@@ -19,21 +19,24 @@
<head>
<meta charset="UTF-8"/>
<title>DCC Viewer</title>
<!-- Link to production CSS -->
<link rel="stylesheet" type="text/css" href="http://141.25.102.20:5173/dist/style.css"/>
</head>
<body>
<div id="app"></div>
<!-- Output the entire XML into a hidden script block as plain text -->
<!-- Output the certificate XML into a hidden script block -->
<script id="xmlContent" type="application/xml">
<xsl:copy-of select="dcc:digitalCalibrationCertificate"/>
</script>
<!-- Load the production bundle and initialize the app -->
<script type="module">
<![CDATA[import { init } from 'http://localhost:5173/src/app.js';
const xmlNode = document.getElementById('xmlContent').firstChild;
const xmlStr = new XMLSerializer().serializeToString(xmlNode);
console.log('Serialized XML:', xmlStr);
init(xmlStr, { containerId: 'app', language: 'en' });]]>
<![CDATA[
import { init } from 'http://141.25.102.20:5173/dist/dccviewer-js.es.js';
const xmlNode = document.getElementById('xmlContent').firstChild;
const xmlStr = new XMLSerializer().serializeToString(xmlNode);
console.log('Serialized XML:', xmlStr);
init(xmlStr, { containerId: 'app', language: 'en' });
]]>
</script>
</body>
</html>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment