-
-
Save HendrikRoth/480193d104bdc6590dfb9bb03d2154b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<h1>Component Test</h1> | |
<div id="test">Test</div> | |
<script src="/component.js?id=test&standalone=true"></script> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (req, res) => { | |
const html = []; | |
html.push('<script src="node_modules/systemjs/dist/system-csp-production.js"></script>'); | |
html.push('<script>System.config({ defaultJSExtensions: false, paths: { "*": "./node_modules/*", "app/*": "/client/*" } }); System.import("app/index.js"); console.log("hi");</script>'); | |
const code = `document.getElementById('${req.query.id}').innerHTML = '${html.join('')}';`; | |
res.send(code); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment