zspecza / common-tags

🔖 Useful template literal tags for dealing with strings in ES2015+
Other
1.99k stars 60 forks source link

Common-tags is not tree shakeable by Webpack becasue sideEffects: false is missing in package.json #219

Open marcopagliarulo opened 1 year ago

marcopagliarulo commented 1 year ago

Webpack requires a package to declare itself as side effects free in order to tree-shake unused modules. https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free

Common-tags looks actually sideEffect free, but the missing flag prevent a proper tree shake, please add the flag to package.jso

Hexagon commented 1 year ago

This is fixed in the fork proper-tags at https://github.com/hexagon/proper-tags published to npmjs.com/package/proper-tags and deno.land/x/proper_tags