You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920
  1. 'use strict';
  2. const parseQuery = require('./parseQuery');
  3. function getOptions(loaderContext) {
  4. const query = loaderContext.query;
  5. if (typeof query === 'string' && query !== '') {
  6. return parseQuery(loaderContext.query);
  7. }
  8. if (!query || typeof query !== 'object') {
  9. // Not object-like queries are not supported.
  10. return null;
  11. }
  12. return query;
  13. }
  14. module.exports = getOptions;