Ich versuche systemjs zu verwenden, und ich habe diesen Code mit tsc exportiert: https://github.com/quantumjs/solar-popup/blob/master/package.json#L10Wie Typoskript Modul konsumieren: System-Export mit systemjs in Browser
{
"compilerOptions": {
"module": "system",
"target": "es5",
"sourceMap": true,
"outFile":"./build/solar-popup.js",
"sourceRoot": "./src/SolarPopup.ts",
"rootDir": "./src/"
},
"exclude": [
"node_modules"
]
}
aber dann versucht, es im Browser zu konsumieren Das importierte Objekt enthält keine der Exporte. Ich denke, das auf den Solar popup.js zurückzuführen ist keine Ausfuhr enthält, nur System.register nennt
Der Export wie folgt aussieht:
System.register("SolarPopup", ["ModalBackground", "constants"], function (exports_4, context_4) {
"use strict";
var __moduleName = context_4 && context_4.id;
var ModalBackground_1, constants_2, SolarPopup;
return {
setters: [
function (ModalBackground_1_1) {
ModalBackground_1 = ModalBackground_1_1;
},
function (constants_2_1) {
constants_2 = constants_2_1;
etc
danke, ich mit am Ende zu tun ** const contactFormPopup = new SolarPopup.SolarPopup (Kind) ** scheint ein bisschen hässlich, ich viel lieber nur ein Webpack Bündel mit .. – Nikos