MCPcopy Index your code
hub / github.com/antfu/vite-fs

github.com/antfu/vite-fs @v0.0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.2 ↗ · + Follow
8 symbols 23 edges 6 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Vite FS

{WIP} Reactive FileSystem for Vite accessable in the client side

NPM version

Install

npm i -D vite-fs
// vite.config.js
import Vue from '@vitejs/plugin-vue'
import ViteFS from 'vite-fs'

export default {
  plugins: [
    Vue(),
    ViteFS()
  ]
}
// shim-fs.d.ts
import { ref } from 'vue'

declare module '*.json.ref' {
  const content: Ref<any>
  export default content
}

declare module '*.ref' {
  const content: Ref<string>
  export default content
}

Usage

Suffix .ref to path you'd like to import, for example

import data from '../data.json.ref'
// the type of `data` will be `Ref<any>`
// `data` will bind to `data.json` magically on dev

data.value.x = 10
// `data.json` will be updated

Sponsors

This project is part of my Sponsor Program

License

MIT License © 2020 Anthony Fu

Core symbols most depended-on inside this repo

readFile
called by 3
src/index.ts
ViteFS
called by 1
src/index.ts
generateDev
called by 1
src/gen.ts
generateBuild
called by 1
src/gen.ts
configResolved
called by 0
src/index.ts
configureServer
called by 0
src/index.ts
resolveId
called by 0
src/index.ts
load
called by 0
src/index.ts

Shape

Function 8

Languages

TypeScript100%

Modules by API surface

src/index.ts6 symbols
src/gen.ts2 symbols

For agents

$ claude mcp add vite-fs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact