Home / Function/ testInjectUrl() — vite Function Reference

testInjectUrl() — vite Function Reference

Architecture documentation for the testInjectUrl() function in lightningcss-plugins.js from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  be08e49d_954d_7051_1a7b_129412f44fe1["testInjectUrl()"]
  c618defc_3b57_317d_60a6_8c85cb7f6060["lightningcss-plugins.js"]
  be08e49d_954d_7051_1a7b_129412f44fe1 -->|defined in| c618defc_3b57_317d_60a6_8c85cb7f6060
  style be08e49d_954d_7051_1a7b_129412f44fe1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

playground/css/lightningcss-plugins.js lines 176–210

export function testInjectUrl() {
  return {
    Rule: {
      unknown: {
        'inject-url': (rule) => {
          return [
            {
              type: 'style',
              value: {
                selectors: [[{ type: 'class', name: 'inject-url' }]],
                declarations: {
                  declarations: [
                    {
                      property: 'background-image',
                      value: [
                        {
                          type: 'url',
                          value: {
                            url: '=/ok.png',
                            loc: rule.loc,
                          },
                        },
                      ],
                    },
                  ],
                },
                loc: rule.loc,
              },
            },
          ]
        },
      },
    },
  }
}

Domain

Subdomains

Frequently Asked Questions

What does testInjectUrl() do?
testInjectUrl() is a function in the vite codebase, defined in playground/css/lightningcss-plugins.js.
Where is testInjectUrl() defined?
testInjectUrl() is defined in playground/css/lightningcss-plugins.js at line 176.

Analyze Your Own Codebase

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

Try Supermodel Free