Webpack plugin that hooks into require() to polyfill module.exports.default for non-ES6 modules, enabling default imports (e.g., import React from 'react') when using TypeScript compiled to ES5. Current version 1.0.3 (last release), stable with no recent updates. Differentiators: avoids the need for a two-pass TypeScript→ES6→Babel pipeline, preserving source maps and reducing build time. Compatible with CommonJS output from TypeScript. Lightweight and specific to webpack + TypeScript workflows.
npm install webpack-fix-default-import-pluginVerified import paths — ran on the pinned version, not inferred.
Basic webpack configuration to enable default imports from CommonJS modules using TypeScript compiled to ES5.
Ensure tsconfig.json has: "target": "es5", "module": "commonjs", "allowSyntheticDefaultImports": true.
Test modules individually; consider using allowSyntheticDefaultImports and esModuleInterop in TypeScript instead.
Set "esModuleInterop": true in tsconfig.json and remove this plugin.
Upgrade to >=1.0.3.
Run: npm install --save-dev webpack-fix-default-import-plugin and require it using correct path.
Use: const FixDefaultImportPlugin = require('webpack-fix-default-import-plugin');Set "allowSyntheticDefaultImports": true and "module": "commonjs" in tsconfig.json.
No dependency data recorded yet.