esperantojs / esperanto

DEPRECATED: An easier way to convert ES6 modules to AMD and CommonJS
http://esperantojs.org
234 stars 21 forks source link

Is there a method to pass input source maps to esperanto? #190

Closed calebmer closed 9 years ago

calebmer commented 9 years ago

When using the modules property in esperanto.bundle is there a way to also pass in source maps? For example:

esperanto.bundle({
  ...
  modules: {
    'index.js': {
      code: '...',
      ast: {...},
      map: {...}
    }
  }
}).then( ... );
Rich-Harris commented 9 years ago

Unfortunately not. I've found it adds a lot of complexity for each step in a build pipeline to have to worry about incoming sourcemaps – I created a tool called sorcery to help with this scenario. It will take any output file and flatten a chain of sourcemaps into one.