stealjs / steal

Gets JavaScript
https://stealjs.com
MIT License
1.37k stars 522 forks source link

Provide a way to disable treeShaking #1448

Closed matthewp closed 6 years ago

matthewp commented 6 years ago

This makes it possible to disable tree shaking 2 ways:

<script src="./node_modules/steal/steal.js"
  main="~/app"
  no-tree-shaking></script>

This allows disabling it on a page-by-page basis. You can also use the package.json flag:

{
  "steal": {
    "treeShaking": false
  }
}

The above is only respected from the root package.json. Closes #1433

matthewp commented 6 years ago

This isn't quite ready to be merged yet.

leoj3n commented 6 years ago

How can I verify from within the built files that treeShaking has indeed been disabled?

matthewp commented 6 years ago

Check if something you expected to be treeshaken was.