# debug-import-vars-webpack-plugin

> creates variables for imports which are named as defined in the original source code for debugging purposes

Latest version **1.1.6** (published 2022-02-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install debug-import-vars-webpack-plugin
pnpm add debug-import-vars-webpack-plugin
yarn add debug-import-vars-webpack-plugin
bun add debug-import-vars-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2022-02-05 |
| First published | 2022-02-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Stefan Ackermann |
| Maintainers | trias |
| Keywords | import, webpack, debugging, webpack-plugin |

## Links

- npm: https://www.npmjs.com/package/debug-import-vars-webpack-plugin
- Repository: https://github.com/trias/debug-import-vars-webpack-plugin
- Homepage: https://github.com/trias/debug-import-vars-webpack-plugin#readme
- Issues: https://github.com/trias/debug-import-vars-webpack-plugin/issues
- npm.io page: https://npm.io/package/debug-import-vars-webpack-plugin

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.1.6 (latest) — 2022-02-05
- 1.1.5 — 2022-02-05
- 1.1.4 — 2022-02-05
- 1.1.3 — 2022-02-05
- 1.1.2 — 2022-02-05

## README

# debug-import-vars-webpack-plugin

This plugin adds import names as they are defined in the original source code for debugging purposes.

Example:

```
// in your code you have this import:
import React from 'react';
// now open devtools and you want to see whats behind `React`
// instead of
react__WEBPACK_IMPORTED_MODULE_3__.version
// you can now just use
React.version
// in your devtools console as you would write in the code
```

## Limitations

**This plugin is not intended for production environments**

- this plugin cannot emulate "live bindings" (e.g. export a `let` variable)
- debug import vars are not available during first (synchronous) execution of the code (as they are defined asynchronously)

## Usage

```javascript
const DebugImportVarsPlugin = require("debug-import-vars-webpack-plugin");

// webpack.config.js
module.exports = {
  plugins: [new DebugImportVarsPlugin()],
};
```

---
_Source: https://npm.io/package/debug-import-vars-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
