"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = _default;

function _react() {
  const data = _interopRequireDefault(require("react"));

  _react = function _react() {
    return data;
  };

  return data;
}

function _assert() {
  const data = _interopRequireDefault(require("assert"));

  _assert = function _assert() {
    return data;
  };

  return data;
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _default(api) {
  return {
    name: 'treeShaking',

    validate(val) {
      (0, _assert().default)(typeof val === 'boolean', `Configure item treeShaking should be Boolean, but got ${val}.`);
    },

    onChange() {
      api.service.restart(
      /* why */
      'Configure item treeShaking Changed.');
    },

    default: false,
    type: 'boolean',
    group: 'webpack',
    title: {
      'zh-CN': '启用 Tree Shaking',
      'en-US': 'Enable Tree Shaking'
    },
    description: {
      'zh-CN': '开启 Tree Shaking 能让项目打包尺寸更小。',
      'en-US': 'Enable Tree Shaking can make your project smaller.'
    }
  };
}