Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ersinakinci/068889f964d8d1367a6138843a3766ab to your computer and use it in GitHub Desktop.
Save ersinakinci/068889f964d8d1367a6138843a3766ab to your computer and use it in GitHub Desktop.
Webpack tree shaking test, example 1: baseline (emitted main.js)
/*!****************!*\
!*** ./bar.js ***!
\****************/
/*! exports provided: bar */function(e,t,n){"use strict";n.r(t),n.d(t,"bar",(function(){return o}));const o=()=>console.log("bar");console.log("bar side effect")},"./baz.js":
/*!****************!*\
!*** ./baz.js ***!
\****************/
/*! exports provided: baz */function(e,t,n){"use strict";n.r(t),n.d(t,"baz",(function(){return o}));const o=()=>console.log("baz");console.log("baz side effect")},"./foo.js":
/*!****************!*\
!*** ./foo.js ***!
\****************/
/*! exports provided: foo1, foo2 */function(e,t,n){"use strict";n.r(t);var o=n(/*! ./bar */"./bar.js");n.d(t,"foo1",(function(){return o.bar}));var r=n(/*! ./baz */"./baz.js");n.d(t,"foo2",(function(){return r.baz})),console.log("foo side effect")},"./index.js":
/*!******************!*\
!*** ./index.js ***!
\******************/
/*! no exports provided */function(e,t,n){"use strict";n.r(t);var o=n(/*! ./foo */"./foo.js");Object(o.foo1)(),console.log("index side effect")}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment