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

Some modules are not included to a bundle when the treeshake is off #1315

Closed
Finesse opened this issue Feb 25, 2017 · 2 comments
Closed

Some modules are not included to a bundle when the treeshake is off #1315

Finesse opened this issue Feb 25, 2017 · 2 comments

Comments

@Finesse
Copy link

Finesse commented Feb 25, 2017

Rollup doesn't include variables, function and classes to a result bundle in some cases when the treeshake parameter is off. Try the following example.

The entry file main.js:

import Foo from './foo.js';
new Foo();

The imported file foo.js:

class Foo {
    constructor() {
        console.log('foo');
    }
}

export default Foo;

The result of bundling using Rollup (with treeshake off and output format iife) is:

(function () {
'use strict';

var Foo = Foo;

new Foo();

}());

As you can see Rollup doesn't include the Foo class to the bundle. When the threeshake is on, the bug doesn't appear.

@Finesse Finesse changed the title Some modules are not included to a bundle when the treeshake is on Some modules are not included to a bundle when the treeshake is off Feb 25, 2017
@Victorystick
Copy link
Contributor

@FinesseRus Is this still an issue now that #1375 is merged?

@Finesse
Copy link
Author

Finesse commented Jun 8, 2017

@Victorystick, it is fixed. Thanks! 👍

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

3 participants