New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-preprocess-debug-info

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-preprocess-debug-info

Preprocess files and replace __LINE__ __FILE__ in C style

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

vite-plugin-preprocess-debug-info

Vite plugin preprocessing source files for C-like __FILE__ and __LINE__

Setup

nuxt.config.ts

import preprocess from 'vite-plugin-preprocess-debug-info';
...
vite: {
    plugins: [
        {
            ...preprocess({dir: __dirname + '/', files: /\.(vue)|(ts)$/}),
            enforce: 'pre'
        }
    ],
...
}

Usage

Any specified file types will be processed. By default .vue and .ts assumed. __FILE__ will be replaced with the file name, __LINE__ with the line number EXACTLY like in the original file.

Motivation

If you'd like to collect logs from the client's browser, it's highly useful to find out the exact place in your code, where the log function has been called.

Keywords

FAQs

Package last updated on 18 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc