Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omit getInteropBlock #939

Closed
emilos opened this issue Sep 14, 2016 · 1 comment
Closed

omit getInteropBlock #939

emilos opened this issue Sep 14, 2016 · 1 comment

Comments

@emilos
Copy link
Contributor

emilos commented Sep 14, 2016

Hey,

thanks for the great tool. I'm trying to include rollup in a bigger app and I'd like to rewrite the files to es6 step by step. I'd like to start with views first, to transpile the files one by one, and later migrate more files to finally end up with a bundle. I was wondering if the following would make sense:

Here's a simplified case, given this input:

import View from 'core/view';
export default View.extend({});

I'd expect to have the following result:

define(['core/view'], function (View) {
      'use strict';

      return View.extend({});
});

however the result I'm getting right now is:

define(['core/view'], function (View) { 'use strict';
    View = 'default' in View ? View['default'] : View;
    var main = View.extend({});
    return main;
});

I'd like to omit the getInteropBlock step, to generate the code from the example 1 if possible for now. Would that make any sense or does that have some downsides? I'll happily create a PR if it makes sense.

@Rich-Harris
Copy link
Contributor

I could get behind an interop: false option. A PR would be great, thank you!

There's a separate issue for the second part (avoiding the return main thing): #826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants