systemjs / builder

SystemJS build tool
MIT License
465 stars 122 forks source link

How can I load the remote file with Builder? #863

Open jensenfan opened 4 years ago

jensenfan commented 4 years ago

Hi, I would like to bundle two remote files with systemjs, here is my attempt:

const path = require('path')
const Builder = require('systemjs-builder');
var builder = new Builder('http://xxx.com/', path.join(__dirname,'./config.js'));
builder
  .bundle(['xx.js','xx.js'], 'index.js')
  .then(function () {
    console.log('Build complete');
  })
  .catch(function (err) {
    console.log('Build error');
    console.log(err);
  });

, obviously it doesn't work. What went wrong? Thx.

guybedford commented 4 years ago

See the note in the project readme -

This project has been deprecated as of SystemJS 2.0. It will continue to support SystemJS 0.21 legacy builds though. Instead, Rollup code splitting builds are encouraged.