0

In my app, I use gulp, to concat all of the vendor files, like this:

gulp.task('vendor', function () {
    return gulp.src(paths.vendor)
        .pipe(concat('vendor.min.js'))
        .pipe(gulp.dest('/dist'))
});

My path.vendor points to all of the files that I need to use in my app:

'node_modules/@angular/common/common.umd.js',
'node_modules/@angular/compiler/compiler.umd.js',
'node_modules/@angular/core/core.umd.js',
'node_modules/@angular/http/http.umd.js',
'node_modules/@angular/platform-browser/platform-browser.umd.js',
'node_modules/@angular/platform-browser-dynamic/platform-browser-dynamic.umd.js',
'node_modules/@angular/router-deprecated/router-deprecated.umd.js',
'node_modules/@angular/upgrade/upgrade.umd.js'

Now, when I try to run the app, with the following SystemJs configuration:

 System.config({
            packages: {
                app: {
                    format: 'register',
                    defaultExtension: 'js'
                }
            },
            map: {
                'rxjs': 'rxjs'
            }
        });
        System.import('app/boot')
                .then(null, console.error.bind(console));

And now, when I am trying to go the the webpage, I get the errors of:

somehost:port/@angular/* 404 (Not found)

Where * are all of the directories I need to use in my app.

How can I configure SystemJs for this to work?

uksz
  • 18,239
  • 30
  • 94
  • 161
  • may be concatenation of files are not done properly i.e order wise, once post `paths.vendor` please ? – Pardeep Jain Jun 01 '16 at 10:07
  • actually, that is my whole paths vendor that I use. – uksz Jun 01 '16 at 10:13
  • I would suggest you use gulp-jspm-build and set minify to false. Here is my recipe for bundling that may help you: http://stackoverflow.com/a/34616199/3532945 – brando Jun 01 '16 at 17:28

0 Answers0