These changes add the bulk of the target request implementation, but do not yet handle invalidations; initial options like serve mode; browserslist config file; etc. Most of the logic is the same, with notable changes being:
PluginConfig has been renamed to ConfigLoader so that the target request can read and parse the package.json file in a consistent manner. The load_package_json_config function has been modified so that the file is deserialized with serde given the generic parameter. This is more flexible, and if the previous API is needed for JavaScript plugins at a later point in time it can be added then.
Context is not inferred for builtin targets when consumers do not provide one, for simplicity and to better align with official standards for the fields
↪️ Pull Request
These changes add the bulk of the target request implementation, but do not yet handle invalidations; initial options like serve mode; browserslist config file; etc. Most of the logic is the same, with notable changes being:
PluginConfig
has been renamed toConfigLoader
so that the target request can read and parse thepackage.json
file in a consistent manner. Theload_package_json_config
function has been modified so that the file is deserialized with serde given the generic parameter. This is more flexible, and if the previous API is needed for JavaScript plugins at a later point in time it can be added then.🚨 Test instructions
yarn build-native && cargo test