You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the efforts. This plugin works great. I will try to explain the case i came across.
"index.es6" imports {Storage} from "abc" which intern import {Cookie} from "xyz".
"abc" is using {Cookie} from "xyz". But Index.es6 is not using {Storage} from "abc". Now common-shake is removing {Storage} from the code but {Cookie} remains in the output file. If I remove reference to {Cookie} from abc then common-shake is removing {Cookie} as well.
Here is the file structure
index.es6
import {Storage} from "./abc";
console.log("this is an example");
abc.es6
import {Cookie} from "./xyz";
export var Storage = function(){
}
Storage.prototype = {
getCookie: function(){
let cookie = new Cookie(); // if i remove this line then common-shake removes Cookie from the output
}
}
Sorry I missed this. The reason for this is that common-shake doesn't know that the Storage.prototype assignment is related to the exports.Storage export. I don't think that'll be easy to solve, it would require much more sophisticated analysis than common-shake can do currently.
Thanks for the efforts. This plugin works great. I will try to explain the case i came across.
"index.es6" imports {Storage} from "abc" which intern import {Cookie} from "xyz".
"abc" is using {Cookie} from "xyz". But Index.es6 is not using {Storage} from "abc". Now common-shake is removing {Storage} from the code but {Cookie} remains in the output file. If I remove reference to {Cookie} from abc then common-shake is removing {Cookie} as well.
Here is the file structure
index.es6
abc.es6
xyz.es6
The text was updated successfully, but these errors were encountered: