browser.js 753 B

1234567891011121314151617181920212223242526272829303132333435
  1. var BrowserslistError = require('./error')
  2. function noop () { }
  3. module.exports = {
  4. loadQueries: function loadQueries () {
  5. throw new BrowserslistError(
  6. 'Sharable configs are not supported in client-side build of Browserslist')
  7. },
  8. getStat: function getStat (opts) {
  9. return opts.stats
  10. },
  11. loadConfig: function loadConfig (opts) {
  12. if (opts.config) {
  13. throw new BrowserslistError(
  14. 'Browserslist config are not supported in client-side build')
  15. }
  16. },
  17. loadCountry: function loadCountry () {
  18. throw new BrowserslistError(
  19. 'Country statistics is not supported ' +
  20. 'in client-side build of Browserslist')
  21. },
  22. parseConfig: noop,
  23. readConfig: noop,
  24. findConfig: noop,
  25. clearCaches: noop
  26. }