MCPcopy
hub / github.com/vitejs/vite / load

Function load

playground/transform-plugin/vite.config.js:9–14  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

7const transformPlugin = {
8 name: 'transform',
9 load(id) {
10 if (id === file) {
11 // Ensure `index.js` is reloaded if 'plugin-dep-load.js' is changed
12 this.addWatchFile('./plugin-dep-load.js')
13 }
14 },
15 transform(code, id) {
16 if (id === file) {
17 // Ensure `index.js` is reevaluated if 'plugin-dep.js' is changed

Callers

nothing calls this directly

Calls 1

addWatchFileMethod · 0.45

Tested by

no test coverage detected