import Vue from "vue";
// 4KB non-zip
import Navigation from "vue-navigation";
import App from "./App.vue";
import router from "./router";
import store from "./store";
// import "./registerServiceWorker";
// 27KB non-zip
import "./plugins/axiosIndex";
import "./plugins/customComponents";
import "./filters";
import "./mixins/logout";
import "./plugins/element.js";
// 14KB JS & 0KB CSS: 7 svg icons
import "./plugins/vueAwesome";
import "./plugins/helpers";

// styles begin
// bootstrap 133KB non-zip
import "./styles/bootstrap.scss";
import "./styles/global.css";
// styles end

// 可以回退到上次route的状态，不重新执行生命周期函数
Vue.use(Navigation, { router });

Vue.config.productionTip = false;

if (
  process.env.NODE_ENV === "development" &&
  process.env.VUE_APP_ENABLE_VUE_RENDER_LOGS === "true"
) {
  const vueLifecylceLogs = require("./plugins/vueLifecylceLogs").default;

  const options = {
    ignoreComponents: [undefined, "transition", "router-link"],
    ignoreComponentsNameRegexArray: [/^i[A-Z].*/, /^fa-.*/],
    groupCollapsed: true,
  };
  vueLifecylceLogs(options);
}

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount("#app");
