modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.21k stars 281 forks source link

fix(storybook-builder): define only necessary process.env globally #2653

Closed bashmish closed 7 months ago

bashmish commented 7 months ago

What I did

  1. improved security by not allowing to bundle all env vars, especially unnecessarily
  2. move env.NODE_ENV to globals defined in the preview index.html, so that rare packages that require it can use it dynamically and rollup can optimise it later as a whole when bundling for production
  3. removed prebundling of tiny-invariant as it's not needed anymore which was one of the goals of above changes
changeset-bot[bot] commented 7 months ago

🦋 Changeset detected

Latest commit: b133b30466b8c22aab0c962fdfd115c04609281c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------- | ----- | | @web/storybook-builder | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR