{"id":20614,"library":"time-fix-plugin","title":"time-fix-plugin","description":"Webpack plugin (v2.0.7, latest) that fixes the startTime for webpack watcher, addressing a watchpack issue where startTime is incorrectly set to 0, causing unnecessary recompilations. Maintained by egoist, supports webpack >=4.0.0. Differentiator: simple drop-in solution; for webpack <4, use v1. No active development since 2020.","status":"maintenance","version":"2.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/egoist/time-fix-plugin","tags":["javascript"],"install":[{"cmd":"npm install time-fix-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add time-fix-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add time-fix-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin to work","package":"webpack","optional":false}],"imports":[{"note":"CommonJS only; no ESM export. Use require.","wrong":"import TimeFixPlugin from 'time-fix-plugin'","symbol":"TimeFixPlugin","correct":"const TimeFixPlugin = require('time-fix-plugin')"},{"note":"Default export, not named. Named import will result in undefined.","wrong":"import { TimeFixPlugin } from 'time-fix-plugin'","symbol":"TimeFixPlugin (default export)","correct":"const TimeFixPlugin = require('time-fix-plugin')"},{"note":"Must instantiate with parentheses, even if no arguments.","wrong":"plugins: [new TimeFixPlugin]","symbol":"Webpack config usage","correct":"plugins: [new TimeFixPlugin()]"}],"quickstart":{"code":"// webpack.config.js\nconst TimeFixPlugin = require('time-fix-plugin');\n\nmodule.exports = {\n  // ... other config\n  plugins: [\n    new TimeFixPlugin()\n  ]\n};","lang":"javascript","description":"Add TimeFixPlugin to webpack plugins array to fix startTime for watcher."},"warnings":[{"fix":"Use version 1 (time-fix-plugin@1) for webpack <4.","message":"Version 2 requires webpack >=4.0.0. Using with webpack <4 will cause errors or unexpected behavior.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Monitor the GitHub repo for forks or alternatives.","message":"No new releases since 2020; project is in maintenance mode. Consider alternatives if issues arise.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Try removing the plugin and see if watcher behaves correctly.","message":"Webpack v5 may have fixed the underlying watchpack issue; test if plugin is still needed.","severity":"gotcha","affected_versions":">=2.0.7"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use const TimeFixPlugin = require('time-fix-plugin')","cause":"Using const { TimeFixPlugin } = require('time-fix-plugin') – named import instead of default.","error":"TypeError: TimeFixPlugin is not a constructor"},{"fix":"Run npm install time-fix-plugin or check node_modules.","cause":"Package not installed or wrong version.","error":"Error: Cannot find module 'time-fix-plugin'"},{"fix":"Upgrade to webpack >=4 or use time-fix-plugin@1.","cause":"Using plugin with webpack <4 (startTime not present).","error":"Unhandled rejection: TypeError: Cannot read property 'startTime' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}