UNPKG

pulsex

Version:

A lightweight and powerful JavaScript library for tracking user activity on websites. Easily monitor user interactions, including page visits, clicks, time spent, and engagement patterns. Designed for flexibility and performance, PulseX integrates seamles

26 lines (24 loc) 800 B
const path = require("path"); module.exports = { entry: "./src/index.ts", // TypeScript entry file output: { filename: "pulsex.min.js", // Output file name path: path.resolve(__dirname, "dist"), // Output directory library: "PulseX", // Global variable when used in browser libraryTarget: "umd", // Universal module (works in Node.js & browser) globalObject: "this", // Ensures compatibility across environments }, resolve: { extensions: [".ts", ".js"], // Resolves both .ts and .js files }, module: { rules: [ { test: /\.ts$/, // Apply loader to .ts files use: "ts-loader", exclude: /node_modules/, // Exclude dependencies }, ], }, mode: "production", // Minifies output for production };