Commit 6568c2e6 authored by Stefan Cameron's avatar Stefan Cameron

Add sideEffects:false bundler hint/flag

This will help bundlers like Webpack which support the hint/flag to
know that this package does not have any side effects, and can
confidently be removed during tree shaking if there are no code
paths that refer to the library (e.g. if you only use RTV in
your development build).

See https://webpack.js.org/configuration/optimization/#optimizationsideeffects
for more information.
parent 8d5a6ecb
Pipeline #93257693 passed with stages
in 3 minutes and 19 seconds
......@@ -9,6 +9,10 @@ Date format is YYYY-MM-DD.
## Unreleased
### Added
- Added `sideEffects:false` bundler hint/flag to `package.json`: This will help bundlers like Webpack which support the hint/flag to know that this package does not have any side effects, and can confidently be removed during tree shaking if there are no code paths that refer to the library (e.g. if you only use RTV in your development build). See [Webpack docs](https://webpack.js.org/configuration/optimization/#optimizationsideeffects) for more information.
### Changed
- When printing a typeset that contains a validator function, the validator is printed as `"<validator>"` instead of `"<function>"` (hopefully that's more helpful when reading the typeset, typically in an `RtvError`'s string representation).
......
......@@ -7,6 +7,7 @@
"npm": ">=6.4.1"
},
"main": "dist/cjs/index.js",
"sideEffects": false,
"pre-commit": [
"precommit:msg",
"lint",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment