Coder Social home page Coder Social logo

a949066041 / vite-plugin-vue-devtools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webfansplz/vite-plugin-vue-devtools

0.0 0.0 0.0 3.24 MB

Vite + Vue DevTools = DX ๐Ÿ”ฅ

License: MIT License

JavaScript 0.05% TypeScript 50.45% CSS 1.46% HTML 0.33% Vue 47.71%

vite-plugin-vue-devtools's Introduction

Vue DevTools Preview

English | ็ฎ€ไฝ“ไธญๆ–‡

NPM Version NPM Downloads Node Compatibility License

๐Ÿ’ก Ideas & Suggestions | ๐Ÿ—บ๏ธ Project Roadmap | ๐Ÿง‘โ€๐Ÿ’ป Discord Channel

๐Ÿ“– Introduction

vite-plugin-vue-devtools is a Vite plugin designed to enhance the Vue developer experience.

๐ŸŽ‰ Features

Pages

The pages tab shows your current routes and provide a quick way to navigate to them. For dynamic routes, it also provide a form to fill with each params interactively. You can also use the textbox to play and test how each route is matched.

Components

Components tab show all the components you are using in your app and hierarchy. You can also select them to see the details of the component (e.g. data,props).

Assets

Assets tab that shows all your static assets and their information. You can open the asset in the browser or download it.

Timeline

Timeline tab has three categories: Performance, Router Navigations, and Pinia. You can switch between them to see the state changes and timelines.

Routes

Routes tab is a feature integrated with Vue Router, allowing you to view the registered routes and their details.

Pinia

Pinia tab is a feature integrated with Pinia, allowing you to view the registered modules and their details.

Graph

Graph tab provides a graph view that show the relationship between components.

Inspect

Inspect expose the vite-plugin-inspect integration, allowing you to inspect transformation steps of Vite. It can be helpful to understand how each plugin is transforming your code and spot potential issues.

Inspector

You can also use the "Inspector" feature to inspect the DOM tree and see which component is rendering it. Click to go to your editor of the specific line. Making it much easier to make changes, without the requirement of understanding the project structure thoroughly. (This feature is implemented based on the vite-plugin-vue-inspector)

๐Ÿ“ฆ Installation


# vite-plugin-vue-devtools 

pnpm install vite-plugin-vue-devtools -D

๐Ÿฆ„ Usage

Configuration Vite

import { defineConfig } from 'vite'
import VueDevTools from 'vite-plugin-vue-devtools'

export default defineConfig({
  plugins: [
    VueDevTools(),
    vue(),
  ],
})

Options

interface AnalyzeOptions {
  /**
   * @default true
  */
  rerenderTrace: boolean
}

interface VitePluginVueDevToolsOptions {
  /**
  * append an import to the module id ending with `appendTo` instead of adding a script into body
  * useful for projects that do not use html file as an entry
  *
  * WARNING: only set this if you know exactly what it does.
  */
  appendTo?: string | RegExp
  /**
   * Enable Vue DevTools to analyze the codebase by using Babel
   * @default
   * {
   *   rerenderTrace: true, // enable rerenderTrace feature
   * }
  */
  analyze?: Partial<AnalyzeOptions>

  /**
  * Customize openInEditor host (e.g. http://localhost:3000)
  * @default false
  */
  openInEditorHost?: string | false
}

๐Ÿ’ก Notice

  • Only available in development mode.

  • Only support Vue3.0+ .

  • Only supports single-instance Vue applications.

  • Doesn't support SSR (If you're using Nuxt, use nuxt/devtools directly).

  • The plugin follows Vue's DevTools configuration, so if you have configured the hide option, it will also be applied in this plugin. e.g.

    // This Vue instance will be ignored by the plugin.
    createApp({
      render: () => h(App),
      devtools: {
        hide: true,
      },
    })

๐Ÿ“– Blog Post

๐ŸŒธ Credits

๐Ÿ‘จโ€๐Ÿ’ป Contributors

๐Ÿ“„ License

MIT LICENSE

vite-plugin-vue-devtools's People

Contributors

alexzhang1030 avatar baiwusanyu-c avatar brenner8023 avatar btea avatar c0dedance avatar cunzaizhuyi avatar edimitchel avatar flippedround avatar innei avatar jahnli avatar jannchie avatar liuseen-l avatar onegil avatar renovate[bot] avatar simon-he95 avatar songjianet avatar soya-xy avatar webfansplz avatar wiidede avatar xinchou16 avatar xxholly32 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.