Webpack introduces fastclick to report errors?

problem: fastclick error report is introduced according to the document.

 var attachFastClick = require("fastclick");
     attachFastClick(document.body);


import FastClick from 'fastclick'
!window.detachFastclick && FastClick.attach(document.body)

https://github.com/ftlabs/fas.

If you're using Browserify or another CommonJS-style module system, the FastClick.attach function will be returned when you call require ('fastclick'). As a result, the easiest way to use FastClick with these loaders is as follows:

var attachFastClick = require ('fastclick');
attachFastClick (document.body);


is your trackingClick event not declared in methods


if you are in the packaging tool, the CMD module mode should be written as

var attachFastClick = require('fastclick');
attachFastClick(document.body);

if something is referenced by script, use the AMD pattern to write it:

var FastClick = require('fastclick');
FastClick.attach(document.body, options);

if it is helpful, please adopt

Menu