1.0.3 • Published 8 months ago

if-wolftrack-html-plugin v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Why

Help to auto-inject if-wolftrack script into rendered html before the head tag depends on the env-mode.

Options

import InsertWolfTrackPlugin from 'if-wolftrack-html-plugin'

InsertWolfTrackPlugin(options)
keytypedefault
FILE_NAMEStringindex.html注入的目标HTML
APP_IDStringDefault应用ID
APP_TYPEString4应用类型,默认4 (H5)
AUTP_PVBooleantrue是否自动发送PV
SPABooleanfalse是否支持单页应用检查
TRACK_URLObject{production: '//localhost'}where_to_sendpv 环境配置 development,test,uat,production

How to Use

webpack

const InsertWolfTrackPlugin = require('if-wolftrack-html-plugin/webpack')
// Vue.config.js
configureWebpack: {
    plugins: [
      new InsertWolfTrackPlugin({
        APP_ID: 'myAppID',
        TRACK_URL: {
            development: '//dev.mysite.com/track_log',
            test: '//test.mysite.com/track_log',
            production: '//prod.mysite.com/track_log'
        }
      })
    ]
  }

Rollup

import InsertWolfPTrack from 'if-wolftrack-html-plugin/rollup'

// vite.config.js
plugins: [
    InsertWolfPTrack({
        APP_ID: 'myAppID',
        TRACK_URL: {
            development: '//dev.mysite.com/track_log',
            test: '//test.mysite.com/track_log',
            production: '//prod.mysite.com/track_log'
        }
    })
]
1.0.3

8 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago