Contributing
Contributors are welcome to help out with this repository!
Please follow this guide when raising issues, and contributing to the SMP repository.
Raising an Issue
If you're raising an issue with SMP being incompatible with a particular webpack config, plugin, or loader - then please include reproduction steps.
The ideal reproduction steps would be forking this repository, and adding a new __tests__/setups test case.
Raising a Pull Request
SMP uses Prettier for its code formatting.
If possible, please also include a new unit test (e.g. utils.test.js), or integration test (i.e. __tests__/setups).
Code Structure
SMP has 2 primary parts:
- The SMP class contains the
smp.wrap
instance method that bootstraps the whole wrapping sequence. This class also listens for basic timing events, and orchestrates the main timings. - The
WrappedPlugin
proxy that wraps each webpack plugin. This uses aProxy
to wrap everything to do with a plugin, feeding the timing information back to the SMP class.