Skip to content

Working source maps and npm package builds

Latest

Choose a tag to compare

@Munter Munter released this 21 Jul 18:41
· 60 commits to master since this release

Breaking changes:

  • serverRoot is now a required first argument
  • All paths are now relative to process.cwd()
  • options.buildFlags.normalize now defaults to false instead of true

serverRoot as first argument

This is a big breaking change adding a requirement on the serverRoot argument. This was needed to get source maps to resolve to the correct url

translate function signature v3:

// translate(options);
require('express-systemjs-translate')({ 
  baseUrl: 'path/to/baseUrl'
});

translate function signature v4:

// translate(serverRoot, options);
require('express-systemjs-translate')('path/to/serverRoot', {
  baseUrl: 'path/to/serverRoot/with/baseUrl'
});

All paths relative to cwd

Paths for serverRoot-argument, baseUrl-option and configFile-option are now all relative to process.cwd() instead of configFile being relative to baseUrl, which was relative to serverRoot

options.buildFlags.normalize = false

There were reports of errors with certain npm packages in the builder if normalization was set to true