index.js 525 B

1234567891011121314151617181920
  1. const path = require('path');
  2. const smsPath = path.dirname(require.resolve('source-map-support'));
  3. const createPattern = function(pattern) {
  4. return {pattern: pattern, included: true, served: true, watched: false};
  5. };
  6. const init = function(files) {
  7. files.unshift(createPattern(path.join(__dirname, 'client.js')));
  8. files.unshift(
  9. createPattern(path.join(smsPath, 'browser-source-map-support.js'))
  10. );
  11. };
  12. init.$inject = ['config.files'];
  13. module.exports = {
  14. 'framework:source-map-support': ['factory', init]
  15. };