https://github.com/davidtranjs/webpack-log-forward-plugin
Webpack plugin for forward browser log to console. Help work with LLM better
https://github.com/davidtranjs/webpack-log-forward-plugin
cursor llm typescript webpack webpack-plugin
Last synced: 3 months ago
JSON representation
Webpack plugin for forward browser log to console. Help work with LLM better
- Host: GitHub
- URL: https://github.com/davidtranjs/webpack-log-forward-plugin
- Owner: davidtranjs
- Created: 2025-07-31T04:24:22.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-09-10T14:10:06.000Z (10 months ago)
- Last Synced: 2025-11-23T03:08:53.007Z (8 months ago)
- Topics: cursor, llm, typescript, webpack, webpack-plugin
- Language: TypeScript
- Homepage: https://webpack-log-forward-plugin.davidtran.dev
- Size: 149 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webpack Log Forward Plugin
A webpack plugin that forwards browser console logs to terminal during development.
## Features
- Forwards browser console logs (log, info, warn, error, debug) to terminal
- Configurable log types, prefix, and timestamp options
- Works with webpack-dev-server
- Non-intrusive - preserves original console behavior
- TypeScript support
## Installation
```bash
npm install @davidtranjs/webpack-log-forward-plugin
```
## Usage
```javascript
const { WebpackLogForwardPlugin } = require('@davidtranjs/webpack-log-forward-plugin');
module.exports = {
// ... other webpack config
plugins: [
new WebpackLogForwardPlugin({
logTypes: ['log', 'info', 'warn', 'error', 'debug'], // optional
prefix: '[Browser]', // optional
includeTimestamp: true, // optional
enabled: true // optional
})
]
};
```
## Development
This project uses Biome.js for linting and formatting. To work on this project:
### Prerequisites
- Node.js 18+
- pnpm (enforced via `preinstall` script)
### Setup
```bash
pnpm install
```
### Available Scripts
- `pnpm build` - Build the TypeScript source
- `pnpm dev` - Watch mode for development
- `pnpm test` - Run tests
- `pnpm lint` - Check code with Biome
- `pnpm lint:fix` - Fix auto-fixable issues
- `pnpm format` - Format code with Biome
- `pnpm format:check` - Check formatting without fixing
### Code Quality
This project uses [Biome.js](https://biomejs.dev/) for:
- **Linting**: Catches potential errors and enforces code quality rules
- **Formatting**: Consistent code formatting across the project
- **Import organization**: Automatically sorts and organizes imports
The Biome configuration is in `biome.json` and includes:
- Single quotes for strings
- 2-space indentation
- 100 character line width
- Strict TypeScript rules
- Git integration with `.gitignore` support
## License
MIT