Home / Function/ notjs() — vite Function Reference

notjs() — vite Function Reference

Architecture documentation for the notjs() function in vite.config.js from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  1f349f53_02a1_2656_33a4_79cbd160db78["notjs()"]
  4f18463e_0189_3a52_f9d6_673fd03d4b34["vite.config.js"]
  1f349f53_02a1_2656_33a4_79cbd160db78 -->|defined in| 4f18463e_0189_3a52_f9d6_673fd03d4b34
  style 1f349f53_02a1_2656_33a4_79cbd160db78 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

playground/optimize-deps/vite.config.js lines 102–136

function notjs() {
  return {
    name: 'notjs',
    config() {
      return {
        optimizeDeps: {
          extensions: ['.notjs'],
          rolldownOptions: {
            plugins: [
              {
                name: 'esbuild-notjs',
                load: {
                  filter: { id: /\.notjs$/ },
                  handler(id) {
                    let contents = fs.readFileSync(id, 'utf-8')
                    contents = contents
                      .replace('<notjs>', '')
                      .replace('</notjs>', '')
                    return contents
                  },
                },
              },
            ],
          },
        },
      }
    },
    transform(code, id) {
      if (id.endsWith('.notjs')) {
        code = code.replace('<notjs>', '').replace('</notjs>', '')
        return { code }
      }
    },
  }
}

Domain

Subdomains

Frequently Asked Questions

What does notjs() do?
notjs() is a function in the vite codebase, defined in playground/optimize-deps/vite.config.js.
Where is notjs() defined?
notjs() is defined in playground/optimize-deps/vite.config.js at line 102.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free