event-logger-loader
v1.2.0
Published
vue loader auto burying point and send event log to app
Downloads
6
Readme
za-burying-point-loader
A Vue.js project
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
For detailed explanation on how things work, consult the docs for vue-loader.
Vue 工程 webpack 引入 loader
{
test: /\.vue$/,
loader: 'event-logger-loader',
exclude:/node_modules/
},
{
test:/\.js$/,
loader:'babel-loader',
include:[/event-logger-loader/]
}
Vue 工程引入 plugin 文件
import Vue from 'vue'
import App from './App'
import router from './router'
import EventLog from 'event-logger-loader/plugins'
Vue.config.productionTip = false;
Vue.use(EventLog,{
onEvent(e){
// 自定义事件处理,默认可不配置
console.log(e)
}
})
new Vue({
el: '#app',
router,
template: '<App/>',
components: {App}
});