browser.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. },
  9. getStat: function getStat(opts) {
  10. return opts.stats
  11. },
  12. loadConfig: function loadConfig(opts) {
  13. if (opts.config) {
  14. throw new BrowserslistError(
  15. 'Browserslist config are not supported in client-side build'
  16. )
  17. }
  18. },
  19. loadCountry: function loadCountry() {
  20. throw new BrowserslistError(
  21. 'Country statistics are not supported ' +
  22. 'in client-side build of Browserslist'
  23. )
  24. },
  25. loadFeature: function loadFeature() {
  26. throw new BrowserslistError(
  27. 'Supports queries are not available in client-side build of Browserslist'
  28. )
  29. },
  30. currentNode: function currentNode(resolve, context) {
  31. return resolve(['maintained node versions'], context)[0]
  32. },
  33. parseConfig: noop,
  34. readConfig: noop,
  35. findConfig: noop,
  36. clearCaches: noop,
  37. oldDataWarning: noop,
  38. env: {}
  39. }