Anidetrix / rollup-plugin-styles

🎨 Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more.
https://anidetrix.github.io/rollup-plugin-styles
MIT License
242 stars 43 forks source link

fix(treeshakable): use es5 syntax for treeshakable object #177

Closed HeadFox closed 2 years ago

HeadFox commented 3 years ago

We still need to support IE-11 in our company (I hope we will drop it this year...) Declare function directly in the object is not supported by IE-11 get() are on the other side supported by IE-11

const module = {
  inject() {}
};

Instead, we need to declare it like this:

const module = {
  inject: function inject() {}
};