loader-utils
schema-utils
loader-utils | schema-utils | |
---|---|---|
2 | 1 | |
765 | 235 | |
0.1% | 0.4% | |
3.0 | 5.3 | |
6 days ago | 7 months ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
loader-utils
-
Building a Custom YAML Loader for Webpack
Obtain the loader options by calling getOptions(loaderContext), which is a function provided by loader-utils. We default the return value of getOptions to an empty object literal in case the webpack config doesn't include the options hash.
-
ReDoS “Vulnerabilities” and Misaligned Incentives
ReDoS and Prototype Pollution vulnerabilities in Webpack (or other developer tool that only ever touches my code and my configs) were scored low severity, I would probably happily ignore them. But they keep popping up with High or Critical severities, with claimed "Network" attack vectors, which nobody can possibly imagine..
Some of them show up as severity 9.8/10 in GitHub vulnerability alerts and then you try to find out more details about them and it turns out it's actually non-exploitable (example here: https://github.com/webpack/loader-utils/issues/212#issuecomm... )
schema-utils
-
Building a Custom YAML Loader for Webpack
We begin by defining a schema for the loader options so we can validate them with schema-utils. The schema is an object that describes properties that you can set when you integrate the loader in your webpack config:
What are some alternatives?
js-yaml - JavaScript YAML parser and dumper. Very fast.
recheck - The trustworthy ReDoS checker
lodash - A modern JavaScript utility library delivering modularity, performance, & extras.
py - Python development support library (note: maintenance only)
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.