@tdent/babel-plugin-vue-functionalization-main
v0.1.4
Published
transfrom main.js of vue project to function.
Downloads
1
Readme
@tdent/babel-plugin-vue-functionalization-main
transfrom main.js of vue project to function.
eg:
- before
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/styles/index.less'
import somePlugin from './plugins/somePlugin'
import {
someFilter
} from '@/filter/index'
Vue.use(somePlugin)
Vue.filter('someFilter', someFilter)
Vue.config.productionTip = false
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
- after
import '@/styles/index.less';
import somePlugin from "@/plugins/somePlugin";
import { someFilter } from '@/filter/index';
export default function (Vue) {
Vue.use(somePlugin);
Vue.filter('someFilter', someFilter);
Vue.config.productionTip = false;
}