I am currently trying to concatenate and minify an angular2 application. My approach so far involved concatenating all my *.js files (boot.js, application.js then all components) into one file and injecting it into my index.html. I also removed the
<script>
System.config({
packages: {
app: {
defaultExtension: 'js'
}
}
});
System.import('app/boot')
.then(null, console.error.bind(console));
</script>
and replaced it with
<script src="js/allMyConcatFilesIntoOne.js"></script>
However, I encountered an error stating that require is missing/unknown.
What is the best way to consolidate angular2 applications into a single file? Should I gather all TypeScript files first, then concatenate and compile them using gulp?
Thank you,
Tenoda