Ich habe ein Problem, wenn ich AOT für meine eckige 4-App, wo ich ap-angular2-Fullcalendar referenzieren.Problem, wenn ap-angular2-Fullcalendar AOT-Problem
Hier meine Konfigurationen in Rollup-config.js
**
import rollup from 'rollup';
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import uglify from 'rollup-plugin-uglify';
import includePaths from 'rollup-plugin-includepaths';
let includePathOptions = {
include: { 'core-module/core.module' : 'core-module/core.module.js' },
extensions: ['.js', '.json', '.html']
};
//paths are relative to the execution path
export default {
input: 'app/main-aot.js',
output : {
file: 'aot/dist/build.js', // output a single application bundle
format: 'iife'
},
sourcemap: true,
sourcemapFile: 'aot/dist/build.js.map',
plugins: [
includePaths(includePathOptions),
nodeResolve({jsnext: true, module: true}),
commonjs({
include: [
'core-module/**',
'app/**',
'node_modules/rxjs/**',
'node_modules/angular2-logger/**',
'node_modules/ng2-bs3-modal/**',
'node_modules/ng2-cookies/**',
'node_modules/ng2-toastr/**',
'node_modules/ng2-translate/**',
'node_modules/ng2-select/**',
'node_modules/jquery/**',
'node_modules/moment/**',
'node_modules/fullcalendar/**',
'node_modules/ap-angular2-fullcalendar/**'
],
namedExports: {
'node_modules/angular2-logger/core.js': [ 'Logger', 'Options', 'Level' ],
'node_modules/ng2-bs3-modal/ng2-bs3-modal.js' : [ 'ModalComponent' ],
'node_modules/ng2-cookies/ng2-cookies.js': [ 'Cookie' ],
'node_modules/ng2-select/index.js': ['SelectModule', 'SelectComponent']
}
}),
uglify()
]
}
**
Dann in index.html I
<link rel="stylesheet" href="node_modules/fullcalendar/dist/fullcalendar.min.css"/>
<script src="/assets/References/jquery-3.2.1.min.js"></script>
<script src="/assets/References/jquery-2.2.0.min.js"></script>
<script src="node_modules/moment/min/moment.min.js"></script>
<script src="node_modules/fullcalendar/dist/fullcalendar.min.js"></script>
<script src="/aot/shim.min.js?v=2.1.4"></script>
<script src="/aot/zone.min.js?v=0.7.4"></script>
<script>window.module = 'aot';</script>
<script src="/aot/dist/build.js?v=2017.11.14"></script>
jedoch aufgenommen haben, Wenn ich meine Website durchsuche, erhalte ich einen Fehler in fullcaledar.js.
abgefangene Typeerror: „Kann Eigenschaft fullCalendar nicht hinzufügen, ist Objekt nicht dehnbar“
während der Entwicklung, es funktioniert, wie ich bin mit systemjs.config.js und es wie
konfiguriert ist,(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
"app": 'app',
'jquery': 'node_modules/jquery/dist/jquery.min.js',
'bootstrap': 'node_modules/bootstrap/dist/js/bootstrap.min.js',
'moment': 'node_modules/moment',
'fullcalendar': 'node_modules/fullcalendar/dist/fullcalendar.js',
'ap-angular2-fullcalendar': 'node_modules/ap-angular2-fullcalendar'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
"app": {
main: './main.js',
defaultExtension: 'js'
},
'fullcalendar': {
defaultExtension: 'js'
},
'ap-angular2-fullcalendar': {
main: 'index.js',
defaultExtension: 'js'
}
}
});
})(this);
Irgendeine Idee, wie man das umgehen kann? Ich plane, Lizenz für vollen Kalender zu kaufen, aber das ist eine Art Blocker im Moment.